I apologize for sending this from my yahoo account. This is the third time I've tried to send this message in the past 26 or so hours and this time I thought I would try a different email account.
Hello, I am using tomcat 4.0.1, jsse 1.0.2, java 1.3.. That's the important version numbers I can think of.. I am trying to access https URLs from within a tomcat servlet and am not having any luck. I am NOT trying to access tomcat via https. I am trying to make a URL connection from a servlet to a https URL. Now that I have that clear... I have recently started using Tomcat and was previously using JServ. The exact same code worked beautifully under JServ. When I switched to tomcat it quit working. Some debugging help... My code reads: // set ourselves up to handle ssl java.security.Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider()); System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); I am putting the 3 jsse jar files in the lib directory under webapps/../web-inf. It fails by telling me that I have a malformed URL when I try to create a URL object with a https prefix. IF I remove the 3 jar files I start getting class not found exceptions, so it is finding the jar files. IF I run with the java 1.4 beta it works. So it is something about having to manually insert jsse. IF I set the JSSE_HOME variable (which causes the jar files to be put in the classpath for tomcat itself) I get past the malformed URL lines. I then start getting java.net.SocketException: SSL implementation not available at javax.net.ssl.DefaultSSLSocketFactory.createSocket([DashoPro-V1.2-120 at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([Da at com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer( at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1 at com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>([DashoP at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>([Dasho at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getOut at TB.collab.db.EventServerConnection.makeConnection(EventServerConnecti this exception. Which tells me again that I think I'm getting some sort of collision between the code that tomcat has set up to allow accesses via https and what I'm doing. If I set JSSE_HOME and have the jsse debugging turned on, I sometimes get: default context init failed: java.security.PrivilegedActionException <<java.security.NoSuchAlgorithmException: Class com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl configured for KeyManagerFactory not a KeyManagerFactory>> Let's see.. what else have I tried.. This happens to be on redhat 7.2, though I don't think that makes a difference. It doesn't seem to make a difference if I put the jsse jar files in $JAVA_HOME/lib/ext. I'm at a loss. The code worked well under jserv (and still works if I run it using JServ); it doesn't work under tomcat. Any help would be appreciated. Thanks, -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/ University of Illinois Phone: (217) 244-5711 405 N. Mathews Ave Fax : (217) 244-6078 Urbana, IL 61801, USA __________________________________________________ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>