fix for derefernce warning CID 327296 & CID 327298

This commit is contained in:
JacobBarthelmeh
2023-10-16 13:36:24 -06:00
parent 3c23f39437
commit 99d46d9a6d

View File

@@ -7997,8 +7997,8 @@ int wolfSSL_SetOCSP_Cb(WOLFSSL* ssl,
CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx)
{ {
WOLFSSL_ENTER("wolfSSL_SetOCSP_Cb"); WOLFSSL_ENTER("wolfSSL_SetOCSP_Cb");
SSL_CM_WARNING(ssl);
if (ssl) { if (ssl) {
SSL_CM_WARNING(ssl);
ssl->ocspIOCtx = ioCbCtx; /* use SSL specific ioCbCtx */ ssl->ocspIOCtx = ioCbCtx; /* use SSL specific ioCbCtx */
return wolfSSL_CertManagerSetOCSP_Cb(SSL_CM(ssl), return wolfSSL_CertManagerSetOCSP_Cb(SSL_CM(ssl),
ioCb, respFreeCb, NULL); ioCb, respFreeCb, NULL);
@@ -8589,9 +8589,10 @@ int wolfSSL_trust_peer_cert(WOLFSSL* ssl, const char* file, int type)
int wolfSSL_EnableCRL(WOLFSSL* ssl, int options) int wolfSSL_EnableCRL(WOLFSSL* ssl, int options)
{ {
WOLFSSL_ENTER("wolfSSL_EnableCRL"); WOLFSSL_ENTER("wolfSSL_EnableCRL");
if (ssl) {
SSL_CM_WARNING(ssl); SSL_CM_WARNING(ssl);
if (ssl)
return wolfSSL_CertManagerEnableCRL(SSL_CM(ssl), options); return wolfSSL_CertManagerEnableCRL(SSL_CM(ssl), options);
}
else else
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
} }