Meaningless Drivel is fun!*
The moose likes Security and the fly likes how to store the digital certificate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "how to store the digital certificate" Watch "how to store the digital certificate" New topic
Author

how to store the digital certificate

hossein arabi
Greenhorn

Joined: Jan 15, 2009
Posts: 20
hi
I am quite new in this field...I have created a digital certificate by using JAVA API not with any keytools or openssl. now I want to store the certificate... how I can do it ?
I will be thankful if anyone can help me in this matter
Thank You.
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
You can store the digital cerificate as a simple text file with an extension .cer.I hope this answers your question.


Aditi
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

You can use the same APIs as keytool to save your certificate in a Java keystore. And as K Aditi said, you can export a certificate as a text file, using an X.509 CertificateFactory. I guess you'll still need to save the private key separately, possibly using an RSA KeyFactory and a PKCS8EncodedKeySpec.
hossein arabi
Greenhorn

Joined: Jan 15, 2009
Posts: 20
thanks friend...I will try ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to store the digital certificate