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?