mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
evp.c: fixes in wolfSSL_EVP_CIPHER_CTX_ctrl() from peer review.
This commit is contained in:
@ -4328,8 +4328,8 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
WOLFSSL_MSG("Key or IV not set");
|
WOLFSSL_MSG("Key or IV not set");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((ret = wc_AesGcmSetExtIV(&ctx->cipher.aes, ctx->iv,
|
if (wc_AesGcmSetExtIV(&ctx->cipher.aes, ctx->iv,
|
||||||
ctx->ivSz)) != 0) {
|
ctx->ivSz) != 0) {
|
||||||
WOLFSSL_MSG("wc_AesGcmSetIV failed");
|
WOLFSSL_MSG("wc_AesGcmSetIV failed");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4337,7 +4337,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
/* Initialize using IV cached in Aes object. */
|
/* Initialize using IV cached in Aes object. */
|
||||||
if (wc_AesGcmInit(&ctx->cipher.aes, NULL, 0, NULL, 0) != 0) {
|
if (wc_AesGcmInit(&ctx->cipher.aes, NULL, 0, NULL, 0) != 0) {
|
||||||
WOLFSSL_MSG("wc_AesGcmInit failed");
|
WOLFSSL_MSG("wc_AesGcmInit failed");
|
||||||
ret = WOLFSSL_FAILURE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_AESGCM_STREAM */
|
#endif /* WOLFSSL_AESGCM_STREAM */
|
||||||
|
Reference in New Issue
Block a user