diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_aes.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 0a9455a5d2..a6d48085c3 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_aes.c,v 1.28 2015/06/20 12:01:14 jsing Exp $ */ | 1 | /* $OpenBSD: e_aes.c,v 1.29 2015/09/10 15:56:25 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -690,7 +690,7 @@ aes_gcm_cleanup(EVP_CIPHER_CTX *c) | |||
690 | 690 | ||
691 | if (gctx->iv != c->iv) | 691 | if (gctx->iv != c->iv) |
692 | free(gctx->iv); | 692 | free(gctx->iv); |
693 | OPENSSL_cleanse(gctx, sizeof(*gctx)); | 693 | explicit_bzero(gctx, sizeof(*gctx)); |
694 | return 1; | 694 | return 1; |
695 | } | 695 | } |
696 | 696 | ||
@@ -972,7 +972,7 @@ aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
972 | 972 | ||
973 | /* If tag mismatch wipe buffer */ | 973 | /* If tag mismatch wipe buffer */ |
974 | if (memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN)) { | 974 | if (memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN)) { |
975 | OPENSSL_cleanse(out, len); | 975 | explicit_bzero(out, len); |
976 | goto err; | 976 | goto err; |
977 | } | 977 | } |
978 | rv = len; | 978 | rv = len; |
@@ -1339,7 +1339,7 @@ aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
1339 | } | 1339 | } |
1340 | } | 1340 | } |
1341 | if (rv == -1) | 1341 | if (rv == -1) |
1342 | OPENSSL_cleanse(out, len); | 1342 | explicit_bzero(out, len); |
1343 | cctx->iv_set = 0; | 1343 | cctx->iv_set = 0; |
1344 | cctx->tag_set = 0; | 1344 | cctx->tag_set = 0; |
1345 | cctx->len_set = 0; | 1345 | cctx->len_set = 0; |
@@ -1417,7 +1417,7 @@ aead_aes_gcm_cleanup(EVP_AEAD_CTX *ctx) | |||
1417 | { | 1417 | { |
1418 | struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state; | 1418 | struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state; |
1419 | 1419 | ||
1420 | OPENSSL_cleanse(gcm_ctx, sizeof(*gcm_ctx)); | 1420 | explicit_bzero(gcm_ctx, sizeof(*gcm_ctx)); |
1421 | free(gcm_ctx); | 1421 | free(gcm_ctx); |
1422 | } | 1422 | } |
1423 | 1423 | ||