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 11:14:21 GMT
mturk       2005/06/07 04:14:21

  Modified:    jni/java/org/apache/tomcat/jni SSL.java
               jni/native/src ssl.c
  Log:
  Add function for setting the global password callback BIO.
  
  Revision  Changes    Path
  1.10      +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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SSL.java	6 Jun 2005 06:54:19 -0000	1.9
  +++ SSL.java	7 Jun 2005 11:14:21 -0000	1.10
  @@ -211,4 +211,10 @@
        */
        public static native int closeBIO(long bio);
   
  +    /**
  +     * Set global Password callback BIO for obtaining passwords.
  +     * @param bio BIO to use.
  +     */
  +     public static native void setPasswordBIO(long bio);
  +
   }
  
  
  
  1.22      +16 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ssl.c	7 Jun 2005 11:05:07 -0000	1.21
  +++ ssl.c	7 Jun 2005 11:14:21 -0000	1.22
  @@ -687,6 +687,21 @@
       return APR_SUCCESS;
   }
   
  +TCN_IMPLEMENT_CALL(void, SSLContext, setPasswordBIO)(TCN_STDARGS, jlong bio)
  +{
  +    BIO *bio_handle   = J2P(bio, BIO *);
  +
  +    UNREFERENCED_STDARGS;
  +    if (tcn_password_callback.bio &&
  +        tcn_password_callback.bio != bio_handle) {
  +        SSL_BIO_close(tcn_password_callback.bio);
  +        tcn_password_callback.bio = bio_handle;
  +    }
  +    else
  +        return;
  +    SSL_BIO_doref(bio_handle);
  +}
  +
   #else
   /* OpenSSL is not supported
    * If someday we make OpenSSL optional
  
  
  

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