From: William A. Rowe Jr Date: Mon, 17 Jun 2002 19:39:19 +0000 (+0000) Subject: These emits occur mainline, outside of the pphrase_callback, so we never X-Git-Tag: 2.0.40~454 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=723742b0665996017b3731c1882e38bb01866e44;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95734 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c index 275758e933..f2d4c7584e 100644 --- a/modules/ssl/ssl_engine_pphrase.c +++ b/modules/ssl/ssl_engine_pphrase.c @@ -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"); }