summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-09-10 15:56:27 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-09-10 15:56:27 +0000
commit4b185770bb48b33b3458575b4dd273d9e9e5b60a (patch)
treefdb63280eeb935a98b2cf72fae41e177686c15ea /lib/libcrypto/bn
parent3a518e4ad573c57d1cc478fe3257cbd80f7098fc (diff)
Correct spelling of OPENSSL_cleanse.
ok miod@
Diffstat (limited to 'lib/libcrypto/bn')
-rw-r--r--lib/libcrypto/bn/bn_exp.c4
-rw-r--r--lib/libcrypto/bn/bn_lib.c8
-rw-r--r--lib/libcrypto/bn/bn_rand.c5
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/libcrypto/bn/bn_exp.c b/lib/libcrypto/bn/bn_exp.c
index 4a28c2c6058..c4ca36d1365 100644
--- a/lib/libcrypto/bn/bn_exp.c
+++ b/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/lib/libcrypto/bn/bn_lib.c b/lib/libcrypto/bn/bn_lib.c
index d0cb49cd1e7..7cc76c1e854 100644
--- a/lib/libcrypto/bn/bn_lib.c
+++ b/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/lib/libcrypto/bn/bn_rand.c b/lib/libcrypto/bn/bn_rand.c
index ac5c5eb3089..783f6c22f80 100644
--- a/lib/libcrypto/bn/bn_rand.c
+++ b/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 <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include <openssl/err.h>
@@ -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);