mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Avoid duplicated callback when error is overriden
This commit is contained in:
committed by
Jacob Barthelmeh
parent
92c9ff5f48
commit
f690a980bf
@@ -7781,6 +7781,7 @@ typedef struct ProcPeerCertArgs {
|
||||
int certIdx;
|
||||
int fatal;
|
||||
int lastErr;
|
||||
int certErr_ovrdn; /* overriden cert error */
|
||||
#ifdef WOLFSSL_ALT_CERT_CHAINS
|
||||
int lastCaErr;
|
||||
#endif
|
||||
@@ -7871,6 +7872,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
XMEMSET(args, 0, sizeof(ProcPeerCertArgs));
|
||||
args->idx = *inOutIdx;
|
||||
args->begin = *inOutIdx;
|
||||
args->certErr_ovrdn = 0;
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
ssl->async.freeArgs = FreeProcPeerCertArgs;
|
||||
#elif defined(WOLFSSL_NONBLOCK_OCSP)
|
||||
@@ -8994,7 +8996,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
#ifdef WOLFSSL_ALWAYS_VERIFY_CB
|
||||
else {
|
||||
if (ssl->verifyCallback) {
|
||||
if (ssl->verifyCallback && !args->certErr_ovrdn) {
|
||||
int ok;
|
||||
|
||||
store->error = ret;
|
||||
|
Reference in New Issue
Block a user