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

Follow-up to r1679032:

Fix regression in check for cached response.

(Essentially) Submitted by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679192 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2015-05-13 12:33:38 +00:00
parent 8efe0b81bb
commit e4ae36a405

View File

@@ -652,13 +652,14 @@ static int stapling_refresh_mutex_off(server_rec *s)
} }
static int get_and_check_cached_response(server_rec *s, modssl_ctx_t *mctx, static int get_and_check_cached_response(server_rec *s, modssl_ctx_t *mctx,
OCSP_RESPONSE **rsp, BOOL *ok, OCSP_RESPONSE **rsp, certinfo *cinf,
certinfo *cinf, apr_pool_t *p) apr_pool_t *p)
{ {
BOOL ok;
int rv; int rv;
/* Check to see if we already have a response for this certificate */ /* Check to see if we already have a response for this certificate */
rv = stapling_get_cached_response(s, rsp, ok, cinf, p); rv = stapling_get_cached_response(s, rsp, &ok, cinf, p);
if (rv == FALSE) { if (rv == FALSE) {
return SSL_TLSEXT_ERR_ALERT_FATAL; return SSL_TLSEXT_ERR_ALERT_FATAL;
} }
@@ -711,7 +712,6 @@ static int stapling_cb(SSL *ssl, void *arg)
certinfo *cinf = NULL; certinfo *cinf = NULL;
OCSP_RESPONSE *rsp = NULL; OCSP_RESPONSE *rsp = NULL;
int rv; int rv;
BOOL ok;
if (sc->server->stapling_enabled != TRUE) { if (sc->server->stapling_enabled != TRUE) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01950) ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01950)
@@ -730,7 +730,7 @@ static int stapling_cb(SSL *ssl, void *arg)
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01952) ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01952)
"stapling_cb: retrieved cached certificate data"); "stapling_cb: retrieved cached certificate data");
rv = get_and_check_cached_response(s, mctx, &rsp, &ok, cinf, conn->pool); rv = get_and_check_cached_response(s, mctx, &rsp, cinf, conn->pool);
if (rv != 0) { if (rv != 0) {
return rv; return rv;
} }
@@ -742,8 +742,7 @@ static int stapling_cb(SSL *ssl, void *arg)
/* Maybe another request refreshed the OCSP response while this /* Maybe another request refreshed the OCSP response while this
* thread waited for the mutex. Check again. * thread waited for the mutex. Check again.
*/ */
rv = get_and_check_cached_response(s, mctx, &rsp, &ok, cinf, rv = get_and_check_cached_response(s, mctx, &rsp, cinf, conn->pool);
conn->pool);
if (rv != 0) { if (rv != 0) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"stapling_cb: error checking for cached response " "stapling_cb: error checking for cached response "