diff options
author | Iaroslav Gridin <voker57@gmail.com> | 2016-10-29 17:48:05 +0300 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-01-10 08:21:45 +0100 |
commit | f61c5ca6ca183bf0a51651857e3efb02a98889ad (patch) | |
tree | 2aaa713f130ee26f7a3a6f557babe9435b053912 /crypto/engine | |
parent | 349b653a99ee37dbcead44a047d6d639c2906ccd (diff) | |
download | openssl-new-f61c5ca6ca183bf0a51651857e3efb02a98889ad.tar.gz |
use EVP_CIPHER_CTX_ functions instead of accessing EVP_CIPHER_CTX internals
by levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1784)
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_cryptodev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index 71a6565cd8..288718c762 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -534,12 +534,13 @@ static int cryptodev_cleanup(EVP_CIPHER_CTX *ctx) static int cryptodev_cipher_ctrl(EVP_CIPHER_CTX *ctx, int type, int p1, void *p2) { - struct dev_crypto_state *state = ctx->cipher_data; + struct dev_crypto_state *state = EVP_CIPHER_CTX_get_cipher_data(ctx); struct session_op *sess = &state->d_sess; if (type == EVP_CTRL_COPY) { EVP_CIPHER_CTX *out = p2; - return cryptodev_init_key(out, sess->key, ctx->iv, 0); + return cryptodev_init_key(out, (unsigned char *)sess->key, + EVP_CIPHER_CTX_iv(ctx), 0); } return 0; |