Skip to content

Commit c873f3f

Browse files
committed
Fix from review
1 parent 2b503da commit c873f3f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/x509_str.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,10 @@ int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX* ctx)
765765
X509StoreCertIsTrusted(ctx->store, ctx->current_cert,
766766
origTrustedSk)) {
767767
wolfSSL_sk_X509_push(ctx->chain, ctx->current_cert);
768+
/* Clear error set by the failed X509StoreVerifyCert
769+
* attempt; the partial-chain fallback accepted the
770+
* chain at a caller-trusted certificate. */
771+
ctx->error = 0;
768772
ret = WOLFSSL_SUCCESS;
769773
} else {
770774
X509VerifyCertSetupRetry(ctx, certs, failedCerts,

0 commit comments

Comments
 (0)