1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Only read "active" values from the key_files array. PR 56306.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kaspar Brand
2014-04-09 09:35:41 +00:00
parent cfd1eb1da7
commit 50ebf352a8
2 changed files with 7 additions and 2 deletions

View File

@@ -914,9 +914,11 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
}
/* and second, the private key */
keyfile = APR_ARRAY_IDX(mctx->pks->key_files, i, const char *);
if (keyfile == NULL)
if (i < mctx->pks->key_files->nelts) {
keyfile = APR_ARRAY_IDX(mctx->pks->key_files, i, const char *);
} else {
keyfile = certfile;
}
ERR_clear_error();