16

I have a PEM file that looks like:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

which I can convert to another PEM file using: openssl x509 -in key.crt -pubkey -noout. The new PEM file now looks like:

-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----

my question is, what is the difference between these two files?

Alex Rothberg
  • 481
  • 2
  • 4
  • 8
  • 2
    take a look in http://superuser.com/questions/620121/what-is-the-difference-between-a-certificate-and-a-key-with-respect-to-ssl – Federico Sierra Feb 17 '15 at 20:40

1 Answers1

11

One is a public cert, the other is a key. As Federico stated in comments, this question addresses it pretty well.

That being said, what are you trying to do?

Jim G.
  • 2,657
  • 1
  • 19
  • 19