mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
additional fix for set verify depth to be compliant with openssl limit
This commit is contained in:
@ -12397,7 +12397,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||||
if (args->untrustedDepth > ssl->options.verifyDepth) {
|
/* limit compliant with OpenSSL verify Depth + 1 */
|
||||||
|
if (args->untrustedDepth > (ssl->options.verifyDepth + 1)) {
|
||||||
ssl->peerVerifyRet = X509_V_ERR_CERT_CHAIN_TOO_LONG;
|
ssl->peerVerifyRet = X509_V_ERR_CERT_CHAIN_TOO_LONG;
|
||||||
ret = MAX_CHAIN_ERROR;
|
ret = MAX_CHAIN_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -4595,8 +4595,8 @@ static void test_wolfSSL_CTX_verifyDepth_ServerClient(void)
|
|||||||
client_args.argc = -1;
|
client_args.argc = -1;
|
||||||
test_client_verifyDepth(&client_args);
|
test_client_verifyDepth(&client_args);
|
||||||
join_thread(serverThread);
|
join_thread(serverThread);
|
||||||
AssertIntEQ(client_args.return_code, TEST_FAIL);
|
AssertIntEQ(client_args.return_code, TEST_SUCCESS);
|
||||||
AssertIntEQ(server_args.return_code, TEST_FAIL);
|
AssertIntEQ(server_args.return_code, TEST_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeTcpReady(&ready);
|
FreeTcpReady(&ready);
|
||||||
|
Reference in New Issue
Block a user