mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
Fix to improve return code logic in wolfSSL_CTX_load_verify_locations_ex
.
This commit is contained in:
@@ -5800,9 +5800,9 @@ int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX* ctx, const char* file,
|
|||||||
if (fileRet != WC_READDIR_NOFILE) {
|
if (fileRet != WC_READDIR_NOFILE) {
|
||||||
ret = fileRet;
|
ret = fileRet;
|
||||||
}
|
}
|
||||||
else if (file == NULL && (successCount == 0 || failCount > 0)) {
|
/* report failure if no files were loaded or there were failures */
|
||||||
/* report failure if no files were loaded or there were failures */
|
else if (successCount == 0 || failCount > 0) {
|
||||||
/* pass on existing error code if exists */
|
/* use existing error code if exists */
|
||||||
if (ret == WOLFSSL_SUCCESS)
|
if (ret == WOLFSSL_SUCCESS)
|
||||||
ret = WOLFSSL_FAILURE;
|
ret = WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user