tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bell <>
Subject IOException: HTTPS hostname wrong
Date Fri, 01 Mar 2002 22:06:42 GMT
I receive an "IOException: HTTPS hostname wrong" exception when using a 
self-signed certificate for SSL connections. I know that this should 
happen so to prevent bad people from fooling me, but I need to turn it 
off for testing purposes. I have tryed to cicurmvent this feature using 
HttpsURLConnection.setDefaultHostnameVerifier() to use a class that lets 
every hostname be correct. Tomcat 4.0.1 seems to be ignoring this, and 
using it's own HostnameVerifier instead. I would use 4.0.2 but there are 
problems with it and my servlet getting along.
Is there a different way to get Tomcat to ignore incorrect hostnames? or 
maybe I'm just doing it wrong?
I've included the code snippet that seems to hate me: It seems to work 
perfect for certificates that have the correct hostname.



        new HostnameVerifier()
            public boolean verify(String urlHostname, String certHostname)
                    return true;
        } );

Nathan Bell
Companion Corporation
Evelyn Manufacturing


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message