forked from wolfSSL/wolfssl
Merge pull request #7441 from kareem-wolfssl/zd17857
Allow using wolfSSL_CTX_set_default_verify_paths without WOLFSSL_SYS_CA_CERTS defined.
This commit is contained in:
@@ -19614,7 +19614,7 @@ long wolfSSL_CTX_ctrl(WOLFSSL_CTX* ctx, int cmd, long opt, void* pt)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WOLFSSL_NO_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
long wolfSSL_CTX_callback_ctrl(WOLFSSL_CTX* ctx, int cmd, void (*fp)(void))
|
long wolfSSL_CTX_callback_ctrl(WOLFSSL_CTX* ctx, int cmd, void (*fp)(void))
|
||||||
{
|
{
|
||||||
(void) ctx;
|
(void) ctx;
|
||||||
@@ -19624,7 +19624,7 @@ long wolfSSL_CTX_callback_ctrl(WOLFSSL_CTX* ctx, int cmd, void (*fp)(void))
|
|||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_NO_STUB */
|
#endif /* NO_WOLFSSL_STUB */
|
||||||
|
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
long wolfSSL_CTX_clear_extra_chain_certs(WOLFSSL_CTX* ctx)
|
long wolfSSL_CTX_clear_extra_chain_certs(WOLFSSL_CTX* ctx)
|
||||||
|
@@ -5029,8 +5029,6 @@ int wolfSSL_CTX_use_RSAPrivateKey(WOLFSSL_CTX* ctx, WOLFSSL_RSA* rsa)
|
|||||||
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
|
||||||
#ifdef WOLFSSL_SYS_CA_CERTS
|
|
||||||
|
|
||||||
/* Use the default paths to look for CA certificate.
|
/* Use the default paths to look for CA certificate.
|
||||||
*
|
*
|
||||||
* This is an OpenSSL compatibility layer function, but it doesn't mirror
|
* This is an OpenSSL compatibility layer function, but it doesn't mirror
|
||||||
@@ -5089,7 +5087,7 @@ int wolfSSL_CTX_set_default_verify_paths(WOLFSSL_CTX* ctx)
|
|||||||
WOLFSSL_MSG("wolfSSL_CTX_set_default_verify_paths not supported"
|
WOLFSSL_MSG("wolfSSL_CTX_set_default_verify_paths not supported"
|
||||||
" with NO_FILESYSTEM enabled");
|
" with NO_FILESYSTEM enabled");
|
||||||
ret = WOLFSSL_FATAL_ERROR;
|
ret = WOLFSSL_FATAL_ERROR;
|
||||||
#else
|
#elif defined(WOLFSSL_SYS_CA_CERTS)
|
||||||
/* Load the system CA certificates. */
|
/* Load the system CA certificates. */
|
||||||
ret = wolfSSL_CTX_load_system_CA_certs(ctx);
|
ret = wolfSSL_CTX_load_system_CA_certs(ctx);
|
||||||
if (ret == WOLFSSL_BAD_PATH) {
|
if (ret == WOLFSSL_BAD_PATH) {
|
||||||
@@ -5098,6 +5096,10 @@ int wolfSSL_CTX_set_default_verify_paths(WOLFSSL_CTX* ctx)
|
|||||||
*/
|
*/
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* OpenSSL's implementation of this API does not require loading the
|
||||||
|
system CA cert directory. Allow skipping this without erroring out. */
|
||||||
|
ret = 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5106,8 +5108,6 @@ int wolfSSL_CTX_set_default_verify_paths(WOLFSSL_CTX* ctx)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WOLFSSL_SYS_CA_CERTS */
|
|
||||||
|
|
||||||
#endif /* OPENSSL_EXTRA */
|
#endif /* OPENSSL_EXTRA */
|
||||||
|
|
||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
|
Reference in New Issue
Block a user