diff --git a/src/ssl.c b/src/ssl.c index 97497b797..065347665 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -997,6 +997,9 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file, CYASSL_ENTER("SSL_CTX_load_verify_locations"); (void)path; + if (ctx == NULL || file == NULL) + return SSL_FAILURE; + if (ProcessFile(ctx, file, SSL_FILETYPE_PEM, CA_TYPE,NULL,0) == SSL_SUCCESS) return SSL_SUCCESS;