Fix engine cryptodev: pointer to IV

Currently point to wrong address

Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Kirill Marinushkin 2016-05-05 20:51:07 +02:00 committed by Richard Levitte
parent edeb3fd295
commit c32b9dcac2

View File

@ -446,7 +446,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
cryp.op = EVP_CIPHER_CTX_encrypting(ctx) ? COP_ENCRYPT : COP_DECRYPT;
if (EVP_CIPHER_CTX_iv_length(ctx) > 0) {
cryp.iv = *(caddr_t*) EVP_CIPHER_CTX_iv(ctx);
cryp.iv = (caddr_t) EVP_CIPHER_CTX_iv(ctx);
if (!EVP_CIPHER_CTX_encrypting(ctx)) {
iiv = in + inl - EVP_CIPHER_CTX_iv_length(ctx);
memcpy(save_iv, iiv, EVP_CIPHER_CTX_iv_length(ctx));