Skip to content

Commit 63a51e8

Browse files
committed
permit signer cert lookup from verified chain
1 parent 1c8f79c commit 63a51e8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libmongoc/src/mongoc/mongoc-openssl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,12 @@ _mongoc_ocsp_tlsext_status (SSL *ssl, mongoc_openssl_ocsp_opt_t *opts)
874874
* 2. Next, the function verifies the signature of the basic response.
875875
* 3. Finally, the function validates the signer cert, constructing the
876876
* validation path via the untrusted cert chain.
877+
*
878+
* cert_chain has already been verified. Use OCSP_TRUSTOTHER so the signer
879+
* certificate can be considered verified if it is in cert_chain.
877880
*/
878-
if (OCSP_basic_verify (basic, cert_chain, store, 0) != OCSP_VERIFY_SUCCESS) {
881+
if (OCSP_basic_verify (basic, cert_chain, store, OCSP_TRUSTOTHER) !=
882+
OCSP_VERIFY_SUCCESS) {
879883
SOFT_FAIL ("OCSP response failed verification: %s", ERR_STR);
880884
ret = OCSP_CB_ERROR;
881885
GOTO (done);

0 commit comments

Comments
 (0)