]> git.kaiwu.me - nginx.git/commitdiff
OCSP stapling: OCSP_basic_verify() OCSP_TRUSTOTHER flag now used.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 1 Oct 2012 12:51:27 +0000 (12:51 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 1 Oct 2012 12:51:27 +0000 (12:51 +0000)
This is expected to simplify configuration in a common case when OCSP
response is signed by a certificate already present in ssl_certificate
chain.  This case won't need any extra trusted certificates.

src/event/ngx_event_openssl_stapling.c

index 435a40fded582a58db1a581588a57bf924c5186c..c09b9f7ecc4a404eb6b61bbefaf7040250c81841 100644 (file)
@@ -588,7 +588,7 @@ ngx_ssl_stapling_ocsp_handler(ngx_ssl_ocsp_ctx_t *ctx)
     chain = staple->ssl_ctx->extra_certs;
 #endif
 
-    if (OCSP_basic_verify(basic, chain, store, 0) != 1) {
+    if (OCSP_basic_verify(basic, chain, store, OCSP_TRUSTOTHER) != 1) {
         ngx_ssl_error(NGX_LOG_ERR, ctx->log, 0,
                       "OCSP_basic_verify() failed");
         goto error;