You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/06/17 21:39:20 UTC

cvs commit: httpd-2.0/modules/ssl ssl_engine_pphrase.c

wrowe       2002/06/17 12:39:19

  Modified:    modules/ssl ssl_engine_pphrase.c
  Log:
    These emits occur mainline, outside of the pphrase_callback, so we never
    opened readtty or writetty.  But they are absolute failures, nothing the
    user could do to deal with them.  They are logged in the ssl vhost's error
    log.
  
    In this case, I forgot my SSLCertificateKeyFile, so the server never
    tried the callback.  writetty wasn't initialized, so we segfaulted.
  
    This segfault is due to misconfig, not to the dialog with the user.
    This is the easiest fix (easier to read, too), but we shouldn't need
    to worry too much that the release is tagged.  If we retag, fine, then
    grab it, but it only addresses a config problem.
  
  Revision  Changes    Path
  1.42      +3 -6      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.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- ssl_engine_pphrase.c	30 May 2002 22:39:08 -0000	1.41
  +++ ssl_engine_pphrase.c	17 Jun 2002 19:39:19 -0000	1.42
  @@ -444,8 +444,7 @@
                                        pServ, "Init: Private key not found");
                           ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
                       }
  -                    if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
  -                          || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
  +                    if (writetty) {
                           apr_file_printf(writetty, "Apache:mod_ssl:Error: Private key not found.\n");
                           apr_file_printf(writetty, "**Stopped\n");
                       }
  @@ -455,8 +454,7 @@
                                    pServ, "Init: Pass phrase incorrect");
                       ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
   
  -                    if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
  -                          || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
  +                    if (writetty) {
                           apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase incorrect.\n");
                           apr_file_printf(writetty, "**Stopped\n");
                       }
  @@ -549,8 +547,7 @@
        */
       if (nPassPhraseDialog > 0) {
           sc = mySrvConfig(s);
  -        if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
  -              || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
  +        if (writetty) {
               apr_file_printf(writetty, "\n");
               apr_file_printf(writetty, "Ok: Pass Phrase Dialog successful.\n");
           }