diff options
author | deraadt <> | 2017-05-02 03:59:45 +0000 |
---|---|---|
committer | deraadt <> | 2017-05-02 03:59:45 +0000 |
commit | 2b561cb0e87f2ee535e8c64907883cd275ad3fec (patch) | |
tree | bb9d050c5c2984047e6475e087694d6764f24157 /src/lib/libcrypto/pem/pem_pkey.c | |
parent | 024e2580a5280d4df3724dab76ce52e14fe2060c (diff) | |
download | openbsd-2b561cb0e87f2ee535e8c64907883cd275ad3fec.tar.gz openbsd-2b561cb0e87f2ee535e8c64907883cd275ad3fec.tar.bz2 openbsd-2b561cb0e87f2ee535e8c64907883cd275ad3fec.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 'src/lib/libcrypto/pem/pem_pkey.c')
-rw-r--r-- | src/lib/libcrypto/pem/pem_pkey.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/pem/pem_pkey.c b/src/lib/libcrypto/pem/pem_pkey.c index 6651ef9419..89181a25f7 100644 --- a/src/lib/libcrypto/pem/pem_pkey.c +++ b/src/lib/libcrypto/pem/pem_pkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pem_pkey.c,v 1.22 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: pem_pkey.c,v 1.23 2017/05/02 03:59:44 deraadt Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -143,8 +143,7 @@ p8err: | |||
143 | PEMerror(ERR_R_ASN1_LIB); | 143 | PEMerror(ERR_R_ASN1_LIB); |
144 | err: | 144 | err: |
145 | free(nm); | 145 | free(nm); |
146 | explicit_bzero(data, len); | 146 | freezero(data, len); |
147 | free(data); | ||
148 | return (ret); | 147 | return (ret); |
149 | } | 148 | } |
150 | 149 | ||