Hej,
AlwaysTrustManager is a reference to the
java source file that you will have created that implements X509TrustManager...
An example for AlwaysTrustManager that should compile under jdk1.3.1
2) The eagle-eyed amongst us will have spotted that
HttpsURLConnection.setDefaultSocketFactory(ctx) is of course, most likely incorrect. If you consult the
JSEE 1.0.2 API documentation, you will have immediately found that it should have been
HttpsURLConnection.setDefaultSSLSocketFactory(ctx);
Of course I didn't mention in my previous post, that both option 1 and option 2 should be perfectly valid solutions on their own.
Why you want to ignore the server certificate chain is a decision that you need to make carefully. The point about using ssl is that you probably want to...
a) Ensure that the server (or client) is who they say they are, hence the certificate chain verification...
b) Ensure that the traffic between the two parties is encrypted.
If it is simply an (small) intranet application, then why do you care about security?
L