This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Security and the fly likes certificate format for cacerts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "certificate format for cacerts" Watch "certificate format for cacerts" New topic
Author

certificate format for cacerts

James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
I have a website that uses a self signed certificate and some java code that needs to use HttpsUrlConnection to access the site.

I know I need to get the certificate imported into cacerts but I am not sure exactly which certificate I should be importing. Rather, I have an export problem. In firefox, there is a plugin that lets you export the certificate in all sorts of formats:

X.509 Certificate (PEM) .crt extension

X.509 Certificate with chain (PEM) .crt extension

X.509 Certificate (DER) .der extension

X.509 Certificate (PKCS#7) .p7c extension

X.509 Certificate with chain (PKCS#7) .p7c extension


Which one should I choose if I want to then use keytool to import the certificate into cacerts?

Thanks,
Jim
James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
It looks like this is the winner:

X.509 Certificate (PEM) .crt extension


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: certificate format for cacerts
 
Similar Threads
Problems Importing a certificate
importing p7b chain as root in keystore
Creation of X509 V3 Certificate
Error trying to import CA Certificate
as of release 5, 'enum' is a keyword...