diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2020-07-02 14:12:33 -0700 |
---|---|---|
committer | Benjamin Kaduk <bkaduk@akamai.com> | 2020-08-11 07:07:58 -0700 |
commit | d91f902d73689c8a8c1bf684ff9d244197f8c7b3 (patch) | |
tree | d62ff78e37f15092a9bd618b831e3415ff778f7b /crypto/evp/e_rc2.c | |
parent | acb30f4b593bbd1bdaa6495d0f641da7ef702b95 (diff) |
Use local IV storage in e_rc2.c
Inline the pre-13273237a65d46186b6bea0b51aec90670d4598a versions
of EVP_CIPHER_CTX_iv(), EVP_CIPHER_CTX_original_iv(), and
EVP_CIPHER_CTX_iv_noconst() in e_rc2.c.
For the legacy implementations, there's no need to use an
in-provider storage for the IV, when the crypto operations
themselves will be performed outside of the provider.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12233)
Diffstat (limited to 'crypto/evp/e_rc2.c')
-rw-r--r-- | crypto/evp/e_rc2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/evp/e_rc2.c b/crypto/evp/e_rc2.c index 88d8e524cc..e8d7106935 100644 --- a/crypto/evp/e_rc2.c +++ b/crypto/evp/e_rc2.c @@ -159,9 +159,7 @@ static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) if (type != NULL) { num = rc2_meth_to_magic(c); j = EVP_CIPHER_CTX_iv_length(c); - i = ASN1_TYPE_set_int_octetstring(type, num, - (unsigned char *)EVP_CIPHER_CTX_original_iv(c), - j); + i = ASN1_TYPE_set_int_octetstring(type, num, c->oiv, j); } return i; } |