From 1b9402de2dd1b97eca2be1996ed51c82f0663c92 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 10 Sep 2015 15:56:26 +0000 Subject: Correct spelling of OPENSSL_cleanse. ok miod@ --- src/lib/libcrypto/bn/bn_exp.c | 4 ++-- src/lib/libcrypto/bn/bn_lib.c | 8 ++++---- src/lib/libcrypto/bn/bn_rand.c | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/lib/libcrypto/bn') diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 4a28c2c605..c4ca36d136 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_exp.c,v 1.22 2015/03/21 08:05:20 doug Exp $ */ +/* $OpenBSD: bn_exp.c,v 1.23 2015/09/10 15:56:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -825,7 +825,7 @@ err: if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); if (powerbuf != NULL) { - OPENSSL_cleanse(powerbuf, powerbufLen); + explicit_bzero(powerbuf, powerbufLen); free(powerbufFree); } BN_CTX_end(ctx); diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index d0cb49cd1e..7cc76c1e85 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lib.c,v 1.33 2014/07/12 16:03:36 miod Exp $ */ +/* $OpenBSD: bn_lib.c,v 1.34 2015/09/10 15:56:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -221,11 +221,11 @@ BN_clear_free(BIGNUM *a) return; bn_check_top(a); if (a->d != NULL && !(BN_get_flags(a, BN_FLG_STATIC_DATA))) { - OPENSSL_cleanse(a->d, a->dmax * sizeof(a->d[0])); + explicit_bzero(a->d, a->dmax * sizeof(a->d[0])); free(a->d); } i = BN_get_flags(a, BN_FLG_MALLOCED); - OPENSSL_cleanse(a, sizeof(BIGNUM)); + explicit_bzero(a, sizeof(BIGNUM)); if (i) free(a); } @@ -395,7 +395,7 @@ bn_expand2(BIGNUM *b, int words) if (!a) return NULL; if (b->d) { - OPENSSL_cleanse(b->d, b->dmax * sizeof(b->d[0])); + explicit_bzero(b->d, b->dmax * sizeof(b->d[0])); free(b->d); } b->d = a; diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c index ac5c5eb308..783f6c22f8 100644 --- a/src/lib/libcrypto/bn/bn_rand.c +++ b/src/lib/libcrypto/bn/bn_rand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_rand.c,v 1.17 2015/02/19 06:10:29 jsing Exp $ */ +/* $OpenBSD: bn_rand.c,v 1.18 2015/09/10 15:56:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -111,6 +111,7 @@ #include #include +#include #include #include @@ -186,7 +187,7 @@ bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) err: if (buf != NULL) { - OPENSSL_cleanse(buf, bytes); + explicit_bzero(buf, bytes); free(buf); } bn_check_top(rnd); -- cgit v1.2.3-55-g6feb