diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-15 15:39:44 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-15 15:39:44 +0000 |
commit | 98c6b199b7d81819090c872d0b36924343d107f4 (patch) | |
tree | e5f35c97b9ff5fc798f00a46137e2275e2218aa8 /lib/libcrypto | |
parent | 5726e0a80fc2367dca4b4bdd0673b5b8eac26c19 (diff) |
The OPENSSL_cleanse() in aes_gcm_cleanup() only cleans the gcm field of the
EVP_AES_GCM_CTX, leaving the AES key untouched - clean the entire context,
rather than just part of it.
ok beck@ miod@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/evp/e_aes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/evp/e_aes.c b/lib/libcrypto/evp/e_aes.c index 197333a6ed7..07b3469f427 100644 --- a/lib/libcrypto/evp/e_aes.c +++ b/lib/libcrypto/evp/e_aes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_aes.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */ +/* $OpenBSD: e_aes.c,v 1.20 2014/06/15 15:39:43 jsing Exp $ */ /* ==================================================================== * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. * @@ -651,7 +651,7 @@ aes_gcm_cleanup(EVP_CIPHER_CTX *c) { EVP_AES_GCM_CTX *gctx = c->cipher_data; - OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm)); + OPENSSL_cleanse(gctx, sizeof(*gctx)); if (gctx->iv != c->iv) free(gctx->iv); return 1; |