Need Help with SSL

E

EJP

I've tried the tutorial at http://tvilda.stilius.net/java/java_ssl.php
and can't get it to work. Is there something wrong with tutorial or am
I making a simple mistake?

It's out of date and very incomplete.

Firstly, you don't need the
-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol part
unless you are running JDK 1.3.

Secondly, after you do the keytool -genkey command you should also do a
keytool -selfcert command using the same alias. See the Javadoc for
details about this.

Thirdly, unless this is just for testing purposes, you need to export
the certificate you just created from the server's keystore and import
it into the client's truststore. Just copying the same keystore file
around is highly insecure. If you have a real certificate resulting from
a keygen followed by an externally satisfied CSR (see the Javadoc/Guide
to Features/JSSE Reference for details), you should import the signed
cert into the server's keystore and the client's truststore.

*Then* it should work and be deployable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top