From: Joe Orton Date: Thu, 3 May 2018 15:41:26 +0000 (+0000) Subject: * modules/ssl/ssl_engine_pphrase.c (ssl_load_encrypted_pkey): X-Git-Tag: 2.5.0-alpha2-ci-test-only~2636 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=382e540ae5b09d48a73b90390eda2066fa679430;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_engine_pphrase.c (ssl_load_encrypted_pkey): Simplify code, no functional change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1830836 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c index 76584535908..0b8023eb80d 100644 --- a/modules/ssl/ssl_engine_pphrase.c +++ b/modules/ssl/ssl_engine_pphrase.c @@ -139,7 +139,6 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx, ssl_asn1_t *asn1; unsigned char *ucp; long int length; - BOOL bReadable; int nPassPhrase = (*pphrases)->nelts; int nPassPhraseRetry = 0; apr_time_t pkey_mtime = 0; @@ -216,16 +215,12 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx, * is not empty. */ ERR_clear_error(); - bReadable = ((pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file, - NULL, ssl_pphrase_Handle_CB, &ppcb_arg)) != NULL ? - TRUE : FALSE); - - /* - * when the private key file now was readable, - * it's fine and we go out of the loop - */ - if (bReadable) - break; + pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file, NULL, + ssl_pphrase_Handle_CB, &ppcb_arg); + /* If the private key was successfully read, nothing more to + do here. */ + if (pPrivateKey != NULL) + break; /* * when we have more remembered pass phrases