I have a p12 storage of certificates, and there are a lot of certificates, they are related to a few different sites, so there are a lot of certs for one site. Im trying to extract them all in a way, that will preserve their names, because there is an important information on the name, identifying cert user by private data. But so far i tried this:
pkcs12 -in myDatabaseCerts.p12 -clcerts -nokeys -out publictheCerts.pem This way i can get all certificates into one file.
And
openssl pkcs12 -in myDatabaseCerts.p12 -nocerts -out keys.pem Is there a way i can extract all this data into individual file of crt and key and preserve their names automatically? So i would get the list in the end like:
John_Williams_ID_18321239.crt and John_Williams_ID_18321239.privatekey(or .pem)
I want to split the p12 into files like this because later i need to assemble each pair into individual p12 file, so basically convert the whole p12 storage, into many many individual files which contains only one key : certificate pair. Is there a way you can do this with openssl? Or only way would be to generate to separate files with key and certificate and parse them using some written script?