summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ecp_nistp521.c
diff options
context:
space:
mode:
authorderaadt <>2017-05-02 03:59:45 +0000
committerderaadt <>2017-05-02 03:59:45 +0000
commit5904cc0e04409fde39a97e6580535da34eeb4291 (patch)
treebb9d050c5c2984047e6475e087694d6764f24157 /src/lib/libcrypto/ec/ecp_nistp521.c
parentb3449a25972849293bca9a6fc6581f37f6e0faf6 (diff)
downloadopenbsd-5904cc0e04409fde39a97e6580535da34eeb4291.tar.gz
openbsd-5904cc0e04409fde39a97e6580535da34eeb4291.tar.bz2
openbsd-5904cc0e04409fde39a97e6580535da34eeb4291.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/ec/ecp_nistp521.c')
-rw-r--r--src/lib/libcrypto/ec/ecp_nistp521.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp521.c b/src/lib/libcrypto/ec/ecp_nistp521.c
index 22bafe392f..6dbc266937 100644
--- a/src/lib/libcrypto/ec/ecp_nistp521.c
+++ b/src/lib/libcrypto/ec/ecp_nistp521.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp521.c,v 1.18 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: ecp_nistp521.c,v 1.19 2017/05/02 03:59:44 deraadt Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -1679,8 +1679,7 @@ nistp521_pre_comp_clear_free(void *pre_)
1679 if (i > 0) 1679 if (i > 0)
1680 return; 1680 return;
1681 1681
1682 explicit_bzero(pre, sizeof(*pre)); 1682 freezero(pre, sizeof(*pre));
1683 free(pre);
1684} 1683}
1685 1684
1686/******************************************************************************/ 1685/******************************************************************************/