mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
always check index into certs
This commit is contained in:
@ -10876,7 +10876,14 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
while (listSz) {
|
while (listSz) {
|
||||||
word32 certSz;
|
word32 certSz;
|
||||||
|
|
||||||
#if !defined(OPENSSL_EXTRA) && !defined(OPENSS_EXTRA_X509_SMALL)
|
|
||||||
|
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||||
|
if (args->totalCerts > ssl->verifyDepth) {
|
||||||
|
ssl->peerVerifyRet = X509_V_ERR_CERT_CHAIN_TOO_LONG;
|
||||||
|
ret = MAX_CHAIN_ERROR;
|
||||||
|
break; /* break out to do certificate verify callback */
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (args->totalCerts >= ssl->verifyDepth ||
|
if (args->totalCerts >= ssl->verifyDepth ||
|
||||||
args->totalCerts >= MAX_CHAIN_DEPTH) {
|
args->totalCerts >= MAX_CHAIN_DEPTH) {
|
||||||
ERROR_OUT(MAX_CHAIN_ERROR, exit_ppc);
|
ERROR_OUT(MAX_CHAIN_ERROR, exit_ppc);
|
||||||
|
Reference in New Issue
Block a user