diff options
author | 2017-05-02 03:59:44 +0000 | |
---|---|---|
committer | 2017-05-02 03:59:44 +0000 | |
commit | 7de8a6843ca16b4f1c9d2a7eab4c71e8af96a4e6 (patch) | |
tree | 3ea360fbba39840d58df496af1ccadf16612454f /lib/libcrypto/evp/p_open.c | |
parent | Matching vmd(8) part of previous diff (first part of vmctl send/receive). (diff) | |
download | wireguard-openbsd-7de8a6843ca16b4f1c9d2a7eab4c71e8af96a4e6.tar.xz wireguard-openbsd-7de8a6843ca16b4f1c9d2a7eab4c71e8af96a4e6.zip |
use freezero() instead of memset/explicit_bzero + free. Substantially
reduces conditional logic (-218, +82).
MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right. Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.
Passes regress. ok beck
Diffstat (limited to 'lib/libcrypto/evp/p_open.c')
-rw-r--r-- | lib/libcrypto/evp/p_open.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/evp/p_open.c b/lib/libcrypto/evp/p_open.c index 1eb238dfdec..57a46706b93 100644 --- a/lib/libcrypto/evp/p_open.c +++ b/lib/libcrypto/evp/p_open.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_open.c,v 1.18 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: p_open.c,v 1.19 2017/05/02 03:59:44 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -109,9 +109,7 @@ EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ret = 1; err: - if (key != NULL) - explicit_bzero(key, size); - free(key); + freezero(key, size); return (ret); } |