use freezero() instead of memset/explicit_bzero + free. Substantially
authorderaadt <deraadt@openbsd.org>
Tue, 2 May 2017 03:59:44 +0000 (03:59 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 2 May 2017 03:59:44 +0000 (03:59 +0000)
commit7de8a6843ca16b4f1c9d2a7eab4c71e8af96a4e6
tree3ea360fbba39840d58df496af1ccadf16612454f
parentf39fb87651ecbea8079a0950f0dda033f8c4c50d
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
38 files changed:
lib/libcrypto/asn1/a_object.c
lib/libcrypto/asn1/a_sign.c
lib/libcrypto/asn1/a_verify.c
lib/libcrypto/asn1/asn1_lib.c
lib/libcrypto/bn/bn_asm.c
lib/libcrypto/bn/bn_exp.c
lib/libcrypto/bn/bn_lib.c
lib/libcrypto/bn/bn_rand.c
lib/libcrypto/buffer/buffer.c
lib/libcrypto/dsa/dsa_asn1.c
lib/libcrypto/ec/ec_key.c
lib/libcrypto/ec/ec_lib.c
lib/libcrypto/ec/ec_mult.c
lib/libcrypto/ec/ecp_nistp224.c
lib/libcrypto/ec/ecp_nistp256.c
lib/libcrypto/ec/ecp_nistp521.c
lib/libcrypto/ec/ecp_nistz256.c
lib/libcrypto/ecdh/ech_lib.c
lib/libcrypto/ecdsa/ecs_lib.c
lib/libcrypto/ecdsa/ecs_vrf.c
lib/libcrypto/evp/bio_enc.c
lib/libcrypto/evp/digest.c
lib/libcrypto/evp/e_aes.c
lib/libcrypto/evp/e_chacha20poly1305.c
lib/libcrypto/evp/p_open.c
lib/libcrypto/gost/gostr341001_key.c
lib/libcrypto/hmac/hm_pmeth.c
lib/libcrypto/malloc-wrapper.c
lib/libcrypto/modes/gcm128.c
lib/libcrypto/pem/pem_lib.c
lib/libcrypto/pem/pem_pkey.c
lib/libcrypto/pem/pvkfmt.c
lib/libcrypto/pkcs12/p12_key.c
lib/libcrypto/pkcs7/pk7_doit.c
lib/libcrypto/rsa/rsa_eay.c
lib/libcrypto/rsa/rsa_saos.c
lib/libcrypto/rsa/rsa_sign.c
lib/libtls/tls_config.c