From f229dd1a7dd951f92d7533beb0d13612e3b264da Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 14 Apr 2019 17:26:27 +0000 Subject: Remove two pointless chunks of code. This reverts part of OpenSSL c2fd5d79, which added the same code to AES CCM, GCM and XTS. In the case of CCM and GCM nothing assigns {ccm,gcm}.key so there is never going to be anything to update (unlike XTS). ok tb@ --- src/lib/libcrypto/evp/e_aes.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/lib/libcrypto') diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 6b455dc503..14875310ad 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_aes.c,v 1.35 2019/03/17 18:07:41 tb Exp $ */ +/* $OpenBSD: e_aes.c,v 1.36 2019/04/14 17:26:27 jsing Exp $ */ /* ==================================================================== * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. * @@ -829,11 +829,6 @@ aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) EVP_CIPHER_CTX *out = ptr; EVP_AES_GCM_CTX *gctx_out = out->cipher_data; - if (gctx->gcm.key) { - if (gctx->gcm.key != &gctx->ks) - return 0; - gctx_out->gcm.key = &gctx_out->ks; - } if (gctx->iv == c->iv) gctx_out->iv = out->iv; else { @@ -1243,17 +1238,7 @@ aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) return 1; case EVP_CTRL_COPY: - { - EVP_CIPHER_CTX *out = ptr; - EVP_AES_CCM_CTX *cctx_out = out->cipher_data; - - if (cctx->ccm.key) { - if (cctx->ccm.key != &cctx->ks) - return 0; - cctx_out->ccm.key = &cctx_out->ks; - } return 1; - } default: return -1; -- cgit v1.2.3-55-g6feb