diff --git a/src/crl.c b/src/crl.c index 40759a4f1..681d0ee9a 100644 --- a/src/crl.c +++ b/src/crl.c @@ -123,7 +123,6 @@ int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert) { CRL_Entry* crle; int foundEntry = 0; - int revoked = 0; int ret = 0; CYASSL_ENTER("CheckCertCRL"); @@ -157,7 +156,6 @@ int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert) while (rc) { if (XMEMCMP(rc->serialNumber, cert->serial, rc->serialSz) == 0) { CYASSL_MSG("Cert revoked"); - revoked = 1; ret = CRL_CERT_REVOKED; break; } diff --git a/src/internal.c b/src/internal.c index 65c196015..92041b559 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5970,9 +5970,7 @@ int SetCipherList(Suites* s, const char* list) ret = RsaSSL_Sign(signBuffer, signSz, output + idx, sigSz, &rsaKey, &ssl->rng); FreeRsaKey(&rsaKey); - if (ret > 0) - ret = 0; /* reset on success */ - else + if (ret <= 0) return ret; } } diff --git a/src/ssl.c b/src/ssl.c index 5e938374c..2936e9089 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -870,7 +870,7 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify) int passwordSz; char password[80]; - if (!info->ctx || !info->ctx->passwd_cb) + if (!info || !info->ctx || !info->ctx->passwd_cb) return SSL_BAD_FILE; /* no callback error */ passwordSz = info->ctx->passwd_cb(password, sizeof(password), 0, info->ctx->userdata);