tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni SSL.properties SSLServer.java
Date Tue, 07 Jun 2005 09:16:59 GMT
mturk       2005/06/07 02:16:59

  Modified:    jni/examples/org/apache/tomcat/jni SSL.properties
                        SSLServer.java
  Log:
  Add password property.
  This is of course insecure, but the real application would
  obtain a password using some more secure method.
  
  Revision  Changes    Path
  1.2       +1 -0      jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/SSL.properties
  
  Index: SSL.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/SSL.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SSL.properties	6 Jun 2005 08:15:52 -0000	1.1
  +++ SSL.properties	7 Jun 2005 09:16:59 -0000	1.2
  @@ -3,3 +3,4 @@
   server.cert=server.crt
   server.key=server.key
   server.ciphers=ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  +#server.password=Certificate password goes here.
  
  
  
  1.2       +5 -3      jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java
  
  Index: SSLServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SSLServer.java	6 Jun 2005 08:15:52 -0000	1.1
  +++ SSLServer.java	7 Jun 2005 09:16:59 -0000	1.2
  @@ -22,6 +22,7 @@
       public static String serverCert = null;
       public static String serverKey  = null;
       public static String serverCiphers  = null;
  +    public static String serverPassword = null;
   
       private static Object threadLock = new Object();
   
  @@ -38,7 +39,8 @@
               serverNmax = Integer.decode(props.getProperty("server.max", "1")).intValue();
               serverCert = props.getProperty("server.cert", "server.pem");
               serverKey  = props.getProperty("server.key", null);
  -            serverCiphers = props.getProperty("server.ciphers", "ALL");
  +            serverCiphers  = props.getProperty("server.ciphers", "ALL");
  +            serverPassword = props.getProperty("server.password", null);
           }
           catch (Throwable t) {
               ; // Nothing
  @@ -55,7 +57,7 @@
               /* List the ciphers that the client is permitted to negotiate. */
               SSLContext.setCipherSuite(serverCtx, serverCiphers);
               /* Load Server key and certificate */
  -            SSLContext.setCertificate(serverCtx, serverCert, serverKey, null, SSL.SSL_AIDX_RSA);
  +            SSLContext.setCertificate(serverCtx, serverCert, serverKey, serverPassword,
SSL.SSL_AIDX_RSA);
               SSLContext.setVerifyDepth(serverCtx, 10);
               SSLContext.setVerifyClient(serverCtx, SSL.SSL_CVERIFY_REQUIRE);
               
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message