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/native/src ssl.c
Date Tue, 07 Jun 2005 18:38:48 GMT
mturk       2005/06/07 11:38:48

  Modified:    jni/java/org/apache/tomcat/jni SSL.java
               jni/native/src ssl.c
  Log:
  Add function for setting the global password.
  Something like JSSE keystore password.
  
  Revision  Changes    Path
  1.13      +7 -1      jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java
  
  Index: SSL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SSL.java	7 Jun 2005 18:26:25 -0000	1.12
  +++ SSL.java	7 Jun 2005 18:38:48 -0000	1.13
  @@ -222,6 +222,12 @@
        public static native void setPasswordBIO(long bio);
   
       /**
  +     * Set global Password for decrypting certificates and keys.
  +     * @param password Password to use.
  +     */
  +     public static native void setPassword(String password);
  +
  +    /**
        * Generate temporary RSA key.
        * <br />
        * Index can be one of:
  
  
  
  1.24      +12 -1     jakarta-tomcat-connectors/jni/native/src/ssl.c
  
  Index: ssl.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/ssl.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ssl.c	7 Jun 2005 18:22:21 -0000	1.23
  +++ ssl.c	7 Jun 2005 18:38:48 -0000	1.24
  @@ -701,6 +701,17 @@
       SSL_BIO_doref(bio_handle);
   }
   
  +TCN_IMPLEMENT_CALL(void, SSLContext, setPassword)(TCN_STDARGS, jstring password)
  +{
  +    TCN_ALLOC_CSTRING(password);
  +    UNREFERENCED(o);
  +    if (J2S(password)) {
  +        strncpy(tcn_password_callback.password, J2S(password), SSL_MAX_PASSWORD_LEN);
  +        tcn_password_callback.password[SSL_MAX_PASSWORD_LEN-1] = '\0';
  +    }
  +    TCN_FREE_CSTRING(password);
  +}
  +
   TCN_IMPLEMENT_CALL(jboolean, SSL, generateRSATempKey)(TCN_STDARGS, jint idx)
   {
       int r = 1;
  
  
  

---------------------------------------------------------------------
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