diff --git a/src/ssl.c b/src/ssl.c index 071cae3b1..bd7f167ea 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -7942,9 +7942,10 @@ int wolfSSL_LoadCRLBuffer(WOLFSSL* ssl, const unsigned char* buff, int wolfSSL_EnableOCSP(WOLFSSL* ssl, int options) { WOLFSSL_ENTER("wolfSSL_EnableOCSP"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerEnableOCSP(SSL_CM(ssl), options); + } else return BAD_FUNC_ARG; } @@ -7975,9 +7976,10 @@ int wolfSSL_EnableOCSPStapling(WOLFSSL* ssl) int wolfSSL_DisableOCSPStapling(WOLFSSL* ssl) { WOLFSSL_ENTER("wolfSSL_DisableOCSPStapling"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerDisableOCSPStapling(SSL_CM(ssl)); + } else return BAD_FUNC_ARG; } @@ -7985,9 +7987,10 @@ int wolfSSL_DisableOCSPStapling(WOLFSSL* ssl) int wolfSSL_SetOCSP_OverrideURL(WOLFSSL* ssl, const char* url) { WOLFSSL_ENTER("wolfSSL_SetOCSP_OverrideURL"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerSetOCSPOverrideURL(SSL_CM(ssl), url); + } else return BAD_FUNC_ARG; } @@ -8601,9 +8604,10 @@ int wolfSSL_EnableCRL(WOLFSSL* ssl, int options) int wolfSSL_DisableCRL(WOLFSSL* ssl) { WOLFSSL_ENTER("wolfSSL_DisableCRL"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerDisableCRL(SSL_CM(ssl)); + } else return BAD_FUNC_ARG; } @@ -8612,9 +8616,10 @@ int wolfSSL_DisableCRL(WOLFSSL* ssl) int wolfSSL_LoadCRL(WOLFSSL* ssl, const char* path, int type, int monitor) { WOLFSSL_ENTER("wolfSSL_LoadCRL"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerLoadCRL(SSL_CM(ssl), path, type, monitor); + } else return BAD_FUNC_ARG; } @@ -8622,9 +8627,10 @@ int wolfSSL_LoadCRL(WOLFSSL* ssl, const char* path, int type, int monitor) int wolfSSL_LoadCRLFile(WOLFSSL* ssl, const char* file, int type) { WOLFSSL_ENTER("wolfSSL_LoadCRLFile"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerLoadCRLFile(SSL_CM(ssl), file, type); + } else return BAD_FUNC_ARG; } @@ -8634,9 +8640,10 @@ int wolfSSL_LoadCRLFile(WOLFSSL* ssl, const char* file, int type) int wolfSSL_SetCRL_Cb(WOLFSSL* ssl, CbMissingCRL cb) { WOLFSSL_ENTER("wolfSSL_SetCRL_Cb"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerSetCRL_Cb(SSL_CM(ssl), cb); + } else return BAD_FUNC_ARG; }