Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SSLHandshakeException unable to find valid certification...

843811Oct 17 2008 — edited Oct 24 2008
Hi,

Let me start off by saying, I don't have much network programming experience, but I've read most of Chapter 11 : Secure Sockets (O'Reilly Java Network Programming 3rd Ed.), and I've also searched for additional tutorials online.

I'm trying to debug a tutorial from the book mentioned above, and every time the client sends a request to the server, the client throws an SSLHandshakeException, and the server reports
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
.

I read a blog written by Andreas Sterbenz, http://blogs.sun.com/andreas/entry/no_more_unable_to_find which explained that any certificate generated by the keytool application will cause this. Attached to the blog is a small application, InstallCert, which generates a KeyStore that contains a certificate that java will read to trust the host that my server application is running on. I ran the utility, and copied the generated KeyStore into the jre/lib/security directory of the jvm I'm using.

My first question is, the certificate that gets added to the KeyStore of hosts that java trusts, does that certificate specify the port as well, or not? I'm can't get the InstallCert application to connect unless it connects on port 443, which is the default SSL port, correct?

After successfully generating the KeyStore using the InstallCert application, my tutorial client / server project still throws the SSLHandshakeException for all of the ports I've tried using, except port 443. When I use port 443, it throws a java.net.BindException: Permission denied

Thanks for any help anyone can offer.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2008
Added on Oct 17 2008
16 comments
2,875 views