]> granicus.if.org Git - apache/commitdiff
These emits occur mainline, outside of the pphrase_callback, so we never
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 17 Jun 2002 19:39:19 +0000 (19:39 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 17 Jun 2002 19:39:19 +0000 (19:39 +0000)
  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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95734 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_pphrase.c

index 275758e933adb31c2a8165bdd42e92ebf8719e77..f2d4c7584ed7b774a92c89c1a657d722c7ca6c61 100644 (file)
@@ -444,8 +444,7 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
                                      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 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
                                  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 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
      */
     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");
         }