summaryrefslogtreecommitdiff
path: root/modules/ssl
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2003-10-22 15:04:11 +0000
committerJoe Orton <jorton@apache.org>2003-10-22 15:04:11 +0000
commitbc1c3f3d88bc1fd89620f7299552ffae1f140c4c (patch)
tree08ff51555205e1057303a49ad3178668da69f1ee /modules/ssl
parentbc2aea49ab6ab310c03396e25028f22f9bc67060 (diff)
downloadhttpd-bc1c3f3d88bc1fd89620f7299552ffae1f140c4c.tar.gz
Fix a cosmetic issue where OpenSSL 0.9.7 will dump the error stack
during pass phrase entry. * ssl_engine_pphrase.c (ssl_pphrase_Handle): Clear the OpenSSL error stack before reading the private key. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl')
-rw-r--r--modules/ssl/ssl_engine_pphrase.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c
index f83a9899b9..35b7764124 100644
--- a/modules/ssl/ssl_engine_pphrase.c
+++ b/modules/ssl/ssl_engine_pphrase.c
@@ -374,6 +374,10 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
cpPassPhraseCur = NULL;
ssl_pphrase_server_rec = s; /* to make up for sslc flaw */
+ /* Ensure that the error stack is empty; otherwise the
+ * OpenSSL UI code may dump it to stderr. */
+ ERR_clear_error();
+
bReadable = ((pPrivateKey = SSL_read_PrivateKey(szPath, NULL,
ssl_pphrase_Handle_CB, s)) != NULL ? TRUE : FALSE);