I will show you the steps that you need to do if you need to put the certificate in the keystore. It does not matter if the certificate is Verisign or self signed certificate.
- There is a default keystore that you can use (I can see you are novice and I will recommend to use the default keytsotre). The default keystore is at the following location
$JDK_HOME$/jre/lib/security
The default keystore name is cacerts
Using keytool, it is possible to display, import, and export certificates
e.g. To view all the certificates already in the keystore use following command
>keytool -list -keystore cacerts
>Enter keystore password: changeit
Importing Certificates
To import a certificate from a file, use the -import command, as in
>keytool -import -keystore cacerts -alias joe -file jcertfile.cer
This sample command imports the certificate(s) in the file jcertfile.cer and stores it in the keystore entry identified by the alias joe.
You import a certificate for two reasons:
1. to add it to the list of trusted certificates, or
2. to import a certificate reply received from a CA as the result of submitting a Certificate Signing Request (see the -certreq command) to that CA.
Hi,
Really use ful information..
Atpresent I am working in SSL,I need to write a client and a server program (usins Sockets ie tcp/ip).We need to communicate using client and server(eg.chat appliaction).Now while tranfering the messages to client and server,I need to see that messges are securely travelled.
So,I need to use SSL,I want to know Wat I need to create and on which machines I need to create the keys,certificates,and trust stores...In these all mandatory?
Please reply...if anyone is working on SSL