forked from wolfSSL/wolfssl
Fixes for scan-build warnings.
This commit is contained in:
@ -2909,7 +2909,6 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
|
|||||||
int ret = wc_CryptoDev_AesCbcEncrypt(aes, out, in, sz);
|
int ret = wc_CryptoDev_AesCbcEncrypt(aes, out, in, sz);
|
||||||
if (ret != NOT_COMPILED_IN)
|
if (ret != NOT_COMPILED_IN)
|
||||||
return ret;
|
return ret;
|
||||||
ret = 0; /* reset error code and try using software */
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)
|
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)
|
||||||
|
@ -9155,7 +9155,7 @@ int wc_KeyPemToDer(const unsigned char* pem, int pemSz,
|
|||||||
XFREE(info, NULL, DYNAMIC_TYPE_ENCRYPTEDINFO);
|
XFREE(info, NULL, DYNAMIC_TYPE_ENCRYPTEDINFO);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0 || der == NULL) {
|
||||||
WOLFSSL_MSG("Bad Pem To Der");
|
WOLFSSL_MSG("Bad Pem To Der");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -9196,7 +9196,7 @@ int wc_CertPemToDer(const unsigned char* pem, int pemSz,
|
|||||||
|
|
||||||
|
|
||||||
ret = PemToDer(pem, pemSz, type, &der, NULL, NULL, &eccKey);
|
ret = PemToDer(pem, pemSz, type, &der, NULL, NULL, &eccKey);
|
||||||
if (ret < 0) {
|
if (ret < 0 || der == NULL) {
|
||||||
WOLFSSL_MSG("Bad Pem To Der");
|
WOLFSSL_MSG("Bad Pem To Der");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -9235,7 +9235,7 @@ int wc_PubKeyPemToDer(const unsigned char* pem, int pemSz,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = PemToDer(pem, pemSz, PUBLICKEY_TYPE, &der, NULL, NULL, NULL);
|
ret = PemToDer(pem, pemSz, PUBLICKEY_TYPE, &der, NULL, NULL, NULL);
|
||||||
if (ret < 0) {
|
if (ret < 0 || der == NULL) {
|
||||||
WOLFSSL_MSG("Bad Pem To Der");
|
WOLFSSL_MSG("Bad Pem To Der");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -959,7 +959,6 @@ static int InitSha256(wc_Sha256* sha256)
|
|||||||
ret = wc_CryptoDev_Sha256Hash(sha256, NULL, 0, hash);
|
ret = wc_CryptoDev_Sha256Hash(sha256, NULL, 0, hash);
|
||||||
if (ret != NOT_COMPILED_IN)
|
if (ret != NOT_COMPILED_IN)
|
||||||
return ret;
|
return ret;
|
||||||
ret = 0; /* reset error code and try using software */
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user