From: Adrian B. (JIRA) <jir...@jb...> - 2005-11-30 22:37:21
|
[ http://jira.jboss.com/jira/browse/JBAS-2502?page=comments#action_12327166 ] Adrian Brock commented on JBAS-2502: ------------------------------------ No. You cannot import javax.net.ss.* until JDK1.4 > HttpsHostVerifier detection fails with NPE with JSSE missing > ------------------------------------------------------------ > > Key: JBAS-2502 > URL: http://jira.jboss.com/jira/browse/JBAS-2502 > Project: JBoss Application Server > Type: Bug > Components: Remoting > Versions: JBossAS-3.2.7 Final > Reporter: Adrian Brock > Fix For: JBossAS-3.2.8 Final > > > The HTTPS host verifier detection is causing NPEs when JSSE is missing. > Even if the user is not using HTTPS. > This will log a warning and leave the class as null > // Determine the type of the HttpsURLConnection in this runtime > ClassLoader loader = Thread.currentThread().getContextClassLoader(); > try > { > // First look for the JDK 1.4 JSSE Https connection > httpsConnClass = loader.loadClass("javax.net.ssl.HttpsURLConnection"); > log.debug("httpsConnClass: " + httpsConnClass); > } > catch (Exception e) > { > // Next try the JSSE external dist Https connection > try > { > httpsConnClass = loader.loadClass("com.sun.net.ssl.HttpsURLConnection"); > log.debug("httpsConnClass: " + httpsConnClass); > } > catch (Exception e2) > { > log.warn("No HttpsURLConnection seen"); > } > } > This will throw an NPE > boolean isHttpsConn = httpsConnClass.isAssignableFrom(conn.getClass()); > if (isHttpsConn) > { > // See if the org.jboss.security.ignoreHttpsHost property is set > if (Boolean.getBoolean(IGNORE_HTTPS_HOST) == true) > { > AnyhostVerifier.setHostnameVerifier(conn); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |