aspose file tools*
The moose likes Security and the fly likes to convert jks format to pkcs7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "to convert jks format to pkcs7" Watch "to convert jks format to pkcs7" New topic
Author

to convert jks format to pkcs7

Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 223

i want to convert keystore file to p7 format.
how can i do that?
Pondurai Singh
Ranch Hand

Joined: Jun 27, 2011
Posts: 35
Convert JKS to PKCS#12 then PKCS#12 to PKCS#7

JKS to PKCS12
keytool -importkeystore -srckeystore myks.jks -destkeystore mystore.p12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass mypwd -deststorepass mypwd -srcalias myalias -destalias myalias -srckeypass mypwd -destkeypass mypwd -noprompt
Export private key
openssl pkcs12 -in mystore.p12 -out mykey.pem -passin pass:mypwd -passout pass:mypwd

To convert a PKCS#12 certificate to PKCS#7 format:
  • Open the certificate file in Internet Explorer.
  • Note: Verify that the certificate chain is complete, including root and intermediate certificates.
  • In the Details tab, click Copy to File. The Certificate Export wizard appears.
  • Specify PKCS#7 format, include all certificates in the certification path, and then click Next.
  • Specify a filename and click Next.
  • Click Finish to export the file in PKCS#7 format. The file is saved with a .P7B extension.


  • Software Developer, Oracle Java Certification Training Labs at EPractize Labs.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: to convert jks format to pkcs7