In the new version of Bouncy Castle library there are changes in PKCS10CertificationRequest. In previous versions it was possible to get PublicKey from such request using getPublicKey() method (see old doc).
Now this method disappered. How can I get PublicKey from with from such request?
There is getSubjectPublicKeyInfo().parsePublicKey() but it returns ASN1Primitive.
I see that from SPKAC NetscapeCertRequest I still can read PublicKey directly by calling getPublicKey().
There is a utility class in the main provider package called PublicKeyFactory. The method createKey returns an AsymmetricKeyParameter which you cast to whatever type of public key is appropriate, e.g.
EDIT 1:
In addition, to create a
java.security.PublicKeya few more steps are needed: