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.