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 sslcontext.c
Date Fri, 03 Jun 2005 07:34:27 GMT
mturk       2005/06/03 00:34:27

  Modified:    jni/native/src sslcontext.c
  Log:
  Throw exceptions instead using BIO. When the exception is
  thrown this means that the SSL is unusable.
  
  Revision  Changes    Path
  1.19      +13 -16    jakarta-tomcat-connectors/jni/native/src/sslcontext.c
  
  Index: sslcontext.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslcontext.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sslcontext.c	2 Jun 2005 11:07:06 -0000	1.18
  +++ sslcontext.c	3 Jun 2005 07:34:27 -0000	1.19
  @@ -359,8 +359,7 @@
           return JNI_FALSE;
   
       if (!SSL_CTX_set_cipher_list(c->ctx, J2S(ciphers))) {
  -        BIO_printf(c->bio_os,
  -                   "[ERROR] Unable to configure permitted SSL ciphers");
  +        tcn_Throw(e, "Unable to configure permitted SSL ciphers");
           rv = JNI_FALSE;
       }
       TCN_FREE_CSTRING(ciphers);
  @@ -459,9 +458,9 @@
               return JNI_TRUE;
           }
       }
  -    BIO_printf(c->bio_os, "[ERROR] Only up to %d "
  -               "different certificates per virtual host allowed",
  -               SSL_AIDX_MAX);
  +    tcn_Throw(e, "Only up to %d "
  +              "different certificates per virtual host allowed",
  +              SSL_AIDX_MAX);
       return JNI_FALSE;
   }
   
  @@ -481,9 +480,9 @@
               return JNI_TRUE;
           }
       }
  -    BIO_printf(c->bio_os, "[ERROR] Only up to %d "
  -               "different private keys per virtual host allowed",
  -               SSL_AIDX_MAX);
  +    tcn_Throw(e, "Only up to %d "
  +              "different private keys per virtual host allowed",
  +              SSL_AIDX_MAX);
       return JNI_FALSE;
   }
   
  @@ -568,7 +567,7 @@
       int verify = SSL_VERIFY_NONE;
       STACK_OF(X509_NAME) *ca_list;
   
  -    UNREFERENCED_STDARGS;
  +    UNREFERENCED(o);
       TCN_ASSERT(ctx != 0);
       c->verify_mode = level;
   
  @@ -592,9 +591,8 @@
           if (!SSL_CTX_load_verify_locations(c->ctx,
                            c->ca_cert_file,
                            c->ca_cert_path)) {
  -            BIO_printf(c->bio_os, "[ERROR] "
  -                       "Unable to configure verify locations "
  -                       "for client authentication");
  +            tcn_Throw(e, "Unable to configure verify locations "
  +                      "for client authentication");
               return JNI_FALSE;
           }
   
  @@ -609,9 +607,8 @@
                                             c->ca_cert_path);
           }
           if (!ca_list) {
  -            BIO_printf(c->bio_os, "[ERROR] "
  -                       "Unable to determine list of acceptable "
  -                       "CA certificates for client authentication");
  +            tcn_Throw(e, "Unable to determine list of acceptable "
  +                      "CA certificates for client authentication");
               return JNI_FALSE;
           }
           SSL_CTX_set_client_CA_list(c->ctx, (STACK *)ca_list);
  
  
  

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