I would like to achieve the same what this openssl command performs, but programmatically in Java:
openssl pkcs7 -in toBeExported.p7c -inform DER -out certificate.pem -print_certs
which means that I have a public key certificate (PKCS #7 Certificate) in DER format and I want to extract the raw certificate contained there to a Base64 file. Is there a way to do this?
Something like
should work with PKCS#7 encoded certificates.
Cheers,