openssl how to export public key as cer code example
Example: get public key from certificate
openssl x509 -inform der -in certificate.der -pubkey -noout > public_key.pem
openssl x509 -inform der -in certificate.der -pubkey -noout > public_key.pem