OpenSSL "x509 -pubkey" - Export Public Key"

Q

How to export the public key out from a certificate using OpenSSL "x509" command?

✍: FYIcenter.com

A

You can export the public key out from a certificate using OpenSSL "x509 -pubkey" command as shown below:

C:\Users\fyicenter>\local\OpenSSL\openssl

OpenSSL> x509 -in twitter.crt -pubkey -noout > twitter_pub.key

OpenSSL> exit

C:\Users\fyicenter>type twitter_pub.key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwgiY+mcABVW2C2EOGte1
isHMA748F/uU99n6TJ9GYJxqrX065TRaErCyC6rsluFYgS+tYKtHk2njhHVTwfkP
uUarnuqrGJiMaFQIUWVDGmGXJ1xeDxXpzRar3VFbdi/80xGZndKmPYcCdeYkluIE
PhSc+n64cUI3ALWwiuIzlYvaP/tjTTdi1RwC6jB+3A1T1dQLuKMQE20fiZQLapRE
ZymCrebVsFL8lVcG1tEiZoTTkioCx5RW31U/whPyfBZ4M6FT93eXXLeWBdVE9L/v
gyJdeuaP5KzfNJ62DwpT8BrbcTdpkvYUqRx1ZXJFJAk7LGrXuWml3N9tnGv8xqJb
MQIDAQAB
-----END PUBLIC KEY-----

 

OpenSSL "x509 -pubout" - Export Public Key"

OpenSSL "x509 -req" - Error "my_ca.srl: No error"

OpenSSL "x509" Command

⇑⇑ OpenSSL Tutorials

2016-10-17, 8243🔥, 0💬