File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i use a PKCS12 file

 
O. Ziggy
Ranch Hand
Posts: 430
Android Debian VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been sent a PKCS12 files but im not sure how to use it. Could someone please briefly explain to me what is and how i can use it.

I did some reading on public and private keys and was expecting two keys and a certificate to be sent to me but instead i recieved two files. A file of type P12 and a txt file with just a random number.

Does this file contain the public and private key + the certificat? To use it, do i need to import it into a keystore or is it itself a keystore?

Thanks
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Does this file contain the public and private key + the certificat?

Yes

To use it, do i need to import it into a keystore or is it itself a keystore?

PKCS12 itself is a keystore.
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To read the pkcs12 file in Java, you need to specify the keystore type as "pkcs12". Here is the keytool command to print the certificate details.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic