mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 02:32:19 +01:00
Always add failed certs back to cert store.
This commit is contained in:
@@ -626,13 +626,11 @@ int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX* ctx)
|
||||
}
|
||||
|
||||
exit:
|
||||
/* Copy back failed certs if verification failed. */
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
numFailedCerts = wolfSSL_sk_X509_num(failedCerts);
|
||||
for (i = 0; i < numFailedCerts; i++)
|
||||
{
|
||||
wolfSSL_sk_X509_push(certs, wolfSSL_sk_X509_pop(failedCerts));
|
||||
}
|
||||
/* Copy back failed certs. */
|
||||
numFailedCerts = wolfSSL_sk_X509_num(failedCerts);
|
||||
for (i = 0; i < numFailedCerts; i++)
|
||||
{
|
||||
wolfSSL_sk_X509_push(certs, wolfSSL_sk_X509_pop(failedCerts));
|
||||
}
|
||||
wolfSSL_sk_X509_pop_free(failedCerts, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user