What's the difference between openssl_pkcs12_export() and openssl_x509_export() PHP functions?
This is probably a stupid question, but as far as I can tell there's not much difference aside the additional p开发者_C百科arameters in pkcs12 version.
More importantly than the formats themselves, the pkcs12 export stores off the private key along with the certificate, whereas the x509 one just stores the certificate.
From the docs, the output file format differs:
openssl_pkcs12_export() stores x509 ... in a PKCS#12 file format.
openssl_x509_export() stores x509 ... in a PEM encoded format.
精彩评论