I want to understand if there is a way to export a public key using any crypto methods, the way openssl is generating.
I am able to successful generate public key with the following command, however I want to automate a part - to create certificate and dynamically generate public key out of it and share with a team
openssl x509 -in SFDC2SUNSelfSigned2504.crt -inform pem -pubkey -noout > SFDC2SelfSigned2504.txt
I understand it is possible to create but, Is it possible to generate this key using apex (without manually executing openssl command from cmd prompt) ? If not apex, is there a way to automate this particular task to avoid manual step.