IV is set in the evp ctx level

This commit is contained in:
Tesfa Mael
2019-11-21 09:58:03 -08:00
parent 6c732725b0
commit 428d51e664

View File

@@ -16169,11 +16169,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
if (ret != 0)
return ret;
}
if (iv && key == NULL) {
ret = wc_AesSetIV(&ctx->cipher.aes, iv);
if (ret != 0)
return ret;
}
}
#endif /* WOLFSSL_AES_128 */
#ifdef WOLFSSL_AES_192
@@ -16200,11 +16195,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
if (ret != 0)
return ret;
}
if (iv && key == NULL) {
ret = wc_AesSetIV(&ctx->cipher.aes, iv);
if (ret != 0)
return ret;
}
}
#endif /* WOLFSSL_AES_192 */
#ifdef WOLFSSL_AES_256
@@ -16233,13 +16223,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
return ret;
}
}
if (iv && key == NULL) {
ret = wc_AesSetIV(&ctx->cipher.aes, iv);
if (ret != 0){
WOLFSSL_MSG("wc_AesSetIV() failed");
return ret;
}
}
}
#endif /* WOLFSSL_AES_256 */
#endif /* HAVE_AESGCM */