I want to create a X509 certificate using Java language and then extract public key from it.
I have searched the internet and found many code examples, but all of th
Yes, with BouncyCastle, creating an X509 cert from 2 public keys (the key for the cert and the one for the CA) is done here.
I turn the resulting certificate into PEM here.