Hi,
To print out the contents of a keystore entry, use the -list command, as in
keytool -list -alias joe
If you don't specify an alias, as in
keytool -list
the contents of the entire keystore are printed.
To display the contents of a certificate stored in a file, use the -printcert command, as in
keytool -printcert -file certfile.cer
This displays information about the certificate stored in the file certfile.cer.
Note: This works independently of a keystore, i.e., you do not need a keystore in order to display a certificate that's stored in a file.
Hope this will help you.
Regards,
Anil.
Technical Support Engineer.
NO :(( I have Oracle 8.1.7 with Apache. and when i use default certificate which is included in Apache, JSSE 1.0.2 says that hostname is the same as in certificate.
So i made my own certificate by keytool. And now there's an error in handshake, because private key which is included by default is for default certificate. So i need to know my private key for my certificate. I wrote a programm, which read keystore and then return Key.getEncoded() - but it doesn't look like private key.