Can you Generate an SSL Certificate in Xojo?

Does anyone have any code they can share which would show how to produce a certificate file for use with the SSLSocket? I’m looking to auto-generate a certificate at the start of the app and I don’t want to rely on external tools like openssl. I’m aware it would be a self-signed certificate, but that’s ok for my purposes.

I was hoping it might be possible to use Xojo’s Crypto functions but I’m unfamiliar with certificate file formats so not too sure what is needed.

Any help appreciated