X509Certificate.getPublicKey

PublicKey getPublicKey() const

Extracts and returns the subject public key.

Supports RSA, ECDSA (P-256, P-384, P-521), and Ed25519 keys.

Returns

The public key as a PublicKey instance.

Throws

CryptoException if the key type is unsupported or

the key data is malformed.