evp.c: fixes in wolfSSL_EVP_CIPHER_CTX_ctrl() from peer review.

This commit is contained in:
Daniel Pouzzner
2021-07-16 17:52:28 -05:00
parent c97eff6e61
commit 785a8f83ed

View File

@ -4328,8 +4328,8 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
WOLFSSL_MSG("Key or IV not set");
break;
}
if ((ret = wc_AesGcmSetExtIV(&ctx->cipher.aes, ctx->iv,
ctx->ivSz)) != 0) {
if (wc_AesGcmSetExtIV(&ctx->cipher.aes, ctx->iv,
ctx->ivSz) != 0) {
WOLFSSL_MSG("wc_AesGcmSetIV failed");
break;
}
@ -4337,7 +4337,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
/* Initialize using IV cached in Aes object. */
if (wc_AesGcmInit(&ctx->cipher.aes, NULL, 0, NULL, 0) != 0) {
WOLFSSL_MSG("wc_AesGcmInit failed");
ret = WOLFSSL_FAILURE;
break;
}
#endif /* WOLFSSL_AESGCM_STREAM */