httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_init.c
Date Thu, 28 Mar 2002 02:09:59 GMT
dougm       02/03/27 18:09:59

  Modified:    modules/ssl ssl_engine_init.c
  Log:
  fix logic from last commit, need to always try importing _both_ rsa
  and dsa
  
  Revision  Changes    Path
  1.75      +9 -6      httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- ssl_engine_init.c	28 Mar 2002 02:01:03 -0000	1.74
  +++ ssl_engine_init.c	28 Mar 2002 02:09:58 -0000	1.75
  @@ -807,6 +807,7 @@
       EVP_PKEY *pkey;
       SSL_CTX *ctx;
       int i;
  +    int have_rsa, have_dsa;
   
       ssl_init_check_server(s, p, ptemp, sc);
   
  @@ -836,9 +837,10 @@
       rsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_RSA);
       dsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_DSA);
   
  -    if (!(ssl_server_import_cert(s, sc, rsa_id, SSL_AIDX_RSA) ||
  -          ssl_server_import_cert(s, sc, dsa_id, SSL_AIDX_DSA)))
  -    {
  +    have_rsa = ssl_server_import_cert(s, sc, rsa_id, SSL_AIDX_RSA);
  +    have_dsa = ssl_server_import_cert(s, sc, dsa_id, SSL_AIDX_DSA);
  +
  +    if (!(have_rsa || have_dsa)) {
           ssl_log(s, SSL_LOG_ERROR|SSL_INIT,
                   "Oops, no RSA or DSA server certificate found?!");
           ssl_log(s, SSL_LOG_ERROR|SSL_INIT,
  @@ -851,9 +853,10 @@
           ssl_check_public_cert(s, ptemp, sc->pPublicCert[i], i);
       }
   
  -    if (!(ssl_server_import_key(s, sc, rsa_id, SSL_AIDX_RSA) ||
  -          ssl_server_import_key(s, sc, dsa_id, SSL_AIDX_DSA)))
  -    {
  +    have_rsa = ssl_server_import_key(s, sc, rsa_id, SSL_AIDX_RSA);
  +    have_dsa = ssl_server_import_key(s, sc, dsa_id, SSL_AIDX_DSA);
  +
  +    if (!(have_rsa || have_dsa)) {
           ssl_log(s, SSL_LOG_ERROR|SSL_INIT,
                   "Oops, no RSA or DSA server private key found?!");
           ssl_die();
  
  
  

Mime
View raw message