There are a couple of different ways to "export" a private+certificate
file to just a certificate file, these are the commands I've found:
Export JUST the certificate PKS12 -> PEM format
$ openssl pkcs12 -in B.p12 -nokeys -out B.crt
Export JUST the certificate in PEM -> PKCS12 format
$ openssl p
Title: Message
I'm trying, without success, to read a
certificate and private key from a PEM file and attach the private key to the
X509 object, so that I don't have to carry it around in my code separately.
There seems to be no API for this purpose.
I'd be happy to write up an FAQ on this