diff options
author | Ben Laurie <ben@apache.org> | 2006-07-23 13:17:28 +0000 |
---|---|---|
committer | Ben Laurie <ben@apache.org> | 2006-07-23 13:17:28 +0000 |
commit | 20c7ffc7566569309301af9a7dd8f7945412052c (patch) | |
tree | 1f73f76ab1ea2e1502b269593d45001ac820d138 /modules/ssl/ssl_engine_pphrase.c | |
parent | 892785ce3942d828d724810ed4f72465da44cc6b (diff) | |
download | httpd-20c7ffc7566569309301af9a7dd8f7945412052c.tar.gz |
Layout and compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@424735 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_engine_pphrase.c')
-rw-r--r-- | modules/ssl/ssl_engine_pphrase.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c index d9f2e29d50..94e3605133 100644 --- a/modules/ssl/ssl_engine_pphrase.c +++ b/modules/ssl/ssl_engine_pphrase.c @@ -186,7 +186,7 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p) * because this file isn't encrypted in any way. */ if (sc->server->pks->cert_files[0] == NULL - && sc->server->pkcs7 == NULL) { + && sc->server->pkcs7 == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, pServ, "Server should be SSL-aware but has no certificate " "configured [Hint: SSLCertificateFile]"); @@ -196,28 +196,31 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p) algoCert = SSL_ALGO_UNKNOWN; algoKey = SSL_ALGO_UNKNOWN; for (i = 0, j = 0; i < SSL_AIDX_MAX - && (sc->server->pks->cert_files[i] != NULL - || sc->server->pkcs7); i++) { - if (sc->server->pkcs7) { - STACK_OF(X509) *certs = ssl_read_pkcs7(pServ, sc->server->pkcs7); - - pX509Cert = sk_X509_value(certs, 0); - i = SSL_AIDX_MAX; - } else { - apr_cpystrn(szPath, sc->server->pks->cert_files[i], sizeof(szPath)); - if ((rv = exists_and_readable(szPath, p, NULL)) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, - "Init: Can't open server certificate file %s", - szPath); - ssl_die(); - } - if ((pX509Cert = SSL_read_X509(szPath, NULL, NULL)) == NULL) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, - "Init: Unable to read server certificate from file %s", szPath); - ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s); - ssl_die(); - } - } + && (sc->server->pks->cert_files[i] != NULL + || sc->server->pkcs7); i++) { + if (sc->server->pkcs7) { + STACK_OF(X509) *certs = ssl_read_pkcs7(pServ, + sc->server->pkcs7); + pX509Cert = sk_X509_value(certs, 0); + i = SSL_AIDX_MAX; + } else { + apr_cpystrn(szPath, sc->server->pks->cert_files[i], + sizeof(szPath)); + if ((rv = exists_and_readable(szPath, p, NULL)) + != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, + "Init: Can't open server certificate file %s", + szPath); + ssl_die(); + } + if ((pX509Cert = SSL_read_X509(szPath, NULL, NULL)) == NULL) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, + "Init: Unable to read server certificate from" + " file %s", szPath); + ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s); + ssl_die(); + } + } /* * check algorithm type of certificate and make * sure only one certificate per type is used. |