I have a p7b certificate(DER encoded) which I need to convert to a PEM encoded certificate so that I can import it into my keystore.
I see that the openssl command below does the job of the conversion
openssl pkcs7 -in infile.p7b -inform DER -print_certs -outform PEM -out outfile.cer
Is there any equivalent keytool command or Java code for the same?