httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <madhusudan_mathiha...@hp.com>
Subject RE: cvs commit: httpd-2.0/modules/ssl ssl_engine_pphrase.c
Date Tue, 31 Jul 2001 01:33:29 GMT
The variable "j" should be incremented after the condition statement 
"if (sc->szPrivateKeyFile[j] == NULL) " - otherwise the condition will
always be true.

============================================================================
=
diff -ru ssl_engine_pphrase.c.orig ssl_engine_pphrase.c
--- ssl_engine_pphrase.c.orig   Mon Jul 30 18:32:10 2001
+++ ssl_engine_pphrase.c        Mon Jul 30 18:32:26 2001
@@ -205,7 +205,7 @@
              * by trying to re-use already known/entered pass phrases.
              */
             if (sc->szPrivateKeyFile[j] != NULL)
-                apr_cpystrn(szPath, sc->szPrivateKeyFile[j++],
sizeof(szPath));
+                apr_cpystrn(szPath, sc->szPrivateKeyFile[j],
sizeof(szPath));
 
             if (sc->szPrivateKeyFile[j] == NULL) {
                 ssl_log(pServ, SSL_LOG_ERROR,
@@ -214,6 +214,7 @@
                         "[Hint: SSLCertificateKeyFile]", cpVHostID);
                 ssl_die();
             }
+            j++;
 
             /*
              * Try to read the private key file with the help of


-Madhu

-----Original Message-----
From: wrowe@apache.org [mailto:wrowe@apache.org]
Sent: Monday, July 30, 2001 3:34 PM
To: httpd-2.0-cvs@apache.org
Subject: cvs commit: httpd-2.0/modules/ssl ssl_engine_pphrase.c


wrowe       01/07/30 15:34:21

  Modified:    modules/ssl ssl_engine_pphrase.c
  Log:
    The short term hack.
  
  Revision  Changes    Path
  1.6       +9 -1      httpd-2.0/modules/ssl/ssl_engine_pphrase.c
  
  Index: ssl_engine_pphrase.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_pphrase.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ssl_engine_pphrase.c	2001/07/19 21:39:26	1.5
  +++ ssl_engine_pphrase.c	2001/07/30 22:34:21	1.6
  @@ -207,6 +207,14 @@
               if (sc->szPrivateKeyFile[j] != NULL)
                   apr_cpystrn(szPath, sc->szPrivateKeyFile[j++],
sizeof(szPath));
   
  +            if (sc->szPrivateKeyFile[j] == NULL) {
  +                ssl_log(pServ, SSL_LOG_ERROR,
  +                        "Init: Server %s should be SSL-aware but "
  +                        "too few private key files were specified "
  +                        "[Hint: SSLCertificateKeyFile]", cpVHostID);
  +                ssl_die();
  +            }
  +
               /*
                * Try to read the private key file with the help of
                * the callback function which serves the pass
  @@ -228,7 +236,7 @@
               nPassPhraseDialogCur  = 0;
               bPassPhraseDialogOnce = TRUE;
   
  -			pPrivateKey = NULL;
  +            pPrivateKey = NULL;
   
               for (;;) {
                   /*
  
  
  

Mime
View raw message