[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-commit] r651 - in jetty/trunk: . jetty-server/src/main/java/org/eclipse/jetty/server/ssl

Author: ayao
Date: 2009-08-06 05:14:51 -0400 (Thu, 06 Aug 2009)
New Revision: 651

Modified:
   jetty/trunk/VERSION.txt
   jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslConnector.java
   jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSelectChannelConnector.java
   jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSocketConnector.java
Log:
[Bug 283375] fix property name; add additional checks to prevent NPE on passwords


Modified: jetty/trunk/VERSION.txt
===================================================================
--- jetty/trunk/VERSION.txt	2009-08-06 07:54:07 UTC (rev 650)
+++ jetty/trunk/VERSION.txt	2009-08-06 09:14:51 UTC (rev 651)
@@ -5,6 +5,7 @@
  + 285697 extract parameters if dispatch has query
  + 282447 concurrent destinations in HttpClient
  + 283172 fix Windows build, broken on directory creation with the DefaultServlet
+ + 283375 additional error-checking on SSL connector passwords to prevent NPE
  + 283513 Check endp.isOpen when blocking read
 
 jetty-7.0.0.RC2 29 June 2009

Modified: jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslConnector.java
===================================================================
--- jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslConnector.java	2009-08-06 07:54:07 UTC (rev 650)
+++ jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslConnector.java	2009-08-06 09:14:51 UTC (rev 651)
@@ -25,7 +25,7 @@
     public static final String KEYPASSWORD_PROPERTY = "org.eclipse.jetty.ssl.keypassword";
     
     /** String name of keystore password property. */
-    public static final String PASSWORD_PROPERTY = "org.eclipse.jetty.jetty.ssl.password";
+    public static final String PASSWORD_PROPERTY = "org.eclipse.jetty.ssl.password";
 
     
     /* ------------------------------------------------------------ */

Modified: jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSelectChannelConnector.java
===================================================================
--- jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSelectChannelConnector.java	2009-08-06 07:54:07 UTC (rev 650)
+++ jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSelectChannelConnector.java	2009-08-06 09:14:51 UTC (rev 651)
@@ -659,7 +659,7 @@
     /* ------------------------------------------------------------ */
     protected KeyManager[] getKeyManagers() throws Exception
     {
-        KeyStore keyStore = getKeyStore(_keystorePath, _keystoreType, _password.toString());
+        KeyStore keyStore = getKeyStore(_keystorePath, _keystoreType, _password==null?null:_password.toString());
         
         KeyManagerFactory keyManagerFactory=KeyManagerFactory.getInstance(_sslKeyManagerFactoryAlgorithm);
         keyManagerFactory.init(keyStore,_keyPassword==null?(_password==null?null:_password.toString().toCharArray()):_keyPassword.toString().toCharArray());
@@ -677,7 +677,7 @@
             _sslTrustManagerFactoryAlgorithm = _sslKeyManagerFactoryAlgorithm;
         }
         
-        KeyStore trustStore = getKeyStore(_truststorePath, _truststoreType, _trustPassword.toString());
+        KeyStore trustStore = getKeyStore(_truststorePath, _truststoreType, _trustPassword==null?null:_trustPassword.toString());
 
         TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(_sslTrustManagerFactoryAlgorithm);
         trustManagerFactory.init(trustStore);

Modified: jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSocketConnector.java
===================================================================
--- jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSocketConnector.java	2009-08-06 07:54:07 UTC (rev 650)
+++ jetty/trunk/jetty-server/src/main/java/org/eclipse/jetty/server/ssl/SslSocketConnector.java	2009-08-06 09:14:51 UTC (rev 651)
@@ -200,7 +200,7 @@
     /* ------------------------------------------------------------ */
     protected KeyManager[] getKeyManagers() throws Exception
     {
-        KeyStore keyStore = getKeyStore(_keystorePath, _keystoreType, _password.toString());
+        KeyStore keyStore = getKeyStore(_keystorePath, _keystoreType, _password==null?null:_password.toString());
         
         KeyManagerFactory keyManagerFactory=KeyManagerFactory.getInstance(_sslKeyManagerFactoryAlgorithm);
         keyManagerFactory.init(keyStore,_keyPassword==null?(_password==null?null:_password.toString().toCharArray()):_keyPassword.toString().toCharArray());
@@ -217,7 +217,7 @@
             _trustPassword = _password;
             _sslTrustManagerFactoryAlgorithm = _sslKeyManagerFactoryAlgorithm;
         }
-        KeyStore trustStore = getKeyStore(_truststorePath, _truststoreType, _trustPassword.toString());
+        KeyStore trustStore = getKeyStore(_truststorePath, _truststoreType, _trustPassword==null?null:_trustPassword.toString());
 
         TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(_sslTrustManagerFactoryAlgorithm);
         trustManagerFactory.init(trustStore);