diff options
author | jsing <> | 2015-09-10 15:56:26 +0000 |
---|---|---|
committer | jsing <> | 2015-09-10 15:56:26 +0000 |
commit | 1b9402de2dd1b97eca2be1996ed51c82f0663c92 (patch) | |
tree | 27c1922db8e3f519794fe6a13a1dfba3d4759090 /src/lib/libcrypto/bn | |
parent | e1b77a3f14ebb06ead650e78b43ddd6546237b0a (diff) | |
download | openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.gz openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.bz2 openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.zip |
Correct spelling of OPENSSL_cleanse.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/bn')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_rand.c | 5 |
3 files changed, 9 insertions, 8 deletions
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 @@ | |||
1 | /* $OpenBSD: bn_exp.c,v 1.22 2015/03/21 08:05:20 doug Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.23 2015/09/10 15:56:25 jsing 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 | * |
@@ -825,7 +825,7 @@ err: | |||
825 | if ((in_mont == NULL) && (mont != NULL)) | 825 | if ((in_mont == NULL) && (mont != NULL)) |
826 | BN_MONT_CTX_free(mont); | 826 | BN_MONT_CTX_free(mont); |
827 | if (powerbuf != NULL) { | 827 | if (powerbuf != NULL) { |
828 | OPENSSL_cleanse(powerbuf, powerbufLen); | 828 | explicit_bzero(powerbuf, powerbufLen); |
829 | free(powerbufFree); | 829 | free(powerbufFree); |
830 | } | 830 | } |
831 | BN_CTX_end(ctx); | 831 | 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 @@ | |||
1 | /* $OpenBSD: bn_lib.c,v 1.33 2014/07/12 16:03:36 miod Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.34 2015/09/10 15:56:25 jsing 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 | * |
@@ -221,11 +221,11 @@ BN_clear_free(BIGNUM *a) | |||
221 | return; | 221 | return; |
222 | bn_check_top(a); | 222 | bn_check_top(a); |
223 | if (a->d != NULL && !(BN_get_flags(a, BN_FLG_STATIC_DATA))) { | 223 | if (a->d != NULL && !(BN_get_flags(a, BN_FLG_STATIC_DATA))) { |
224 | OPENSSL_cleanse(a->d, a->dmax * sizeof(a->d[0])); | 224 | explicit_bzero(a->d, a->dmax * sizeof(a->d[0])); |
225 | free(a->d); | 225 | free(a->d); |
226 | } | 226 | } |
227 | i = BN_get_flags(a, BN_FLG_MALLOCED); | 227 | i = BN_get_flags(a, BN_FLG_MALLOCED); |
228 | OPENSSL_cleanse(a, sizeof(BIGNUM)); | 228 | explicit_bzero(a, sizeof(BIGNUM)); |
229 | if (i) | 229 | if (i) |
230 | free(a); | 230 | free(a); |
231 | } | 231 | } |
@@ -395,7 +395,7 @@ bn_expand2(BIGNUM *b, int words) | |||
395 | if (!a) | 395 | if (!a) |
396 | return NULL; | 396 | return NULL; |
397 | if (b->d) { | 397 | if (b->d) { |
398 | OPENSSL_cleanse(b->d, b->dmax * sizeof(b->d[0])); | 398 | explicit_bzero(b->d, b->dmax * sizeof(b->d[0])); |
399 | free(b->d); | 399 | free(b->d); |
400 | } | 400 | } |
401 | b->d = a; | 401 | 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 @@ | |||
1 | /* $OpenBSD: bn_rand.c,v 1.17 2015/02/19 06:10:29 jsing Exp $ */ | 1 | /* $OpenBSD: bn_rand.c,v 1.18 2015/09/10 15:56:25 jsing 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 | * |
@@ -111,6 +111,7 @@ | |||
111 | 111 | ||
112 | #include <stdio.h> | 112 | #include <stdio.h> |
113 | #include <stdlib.h> | 113 | #include <stdlib.h> |
114 | #include <string.h> | ||
114 | #include <time.h> | 115 | #include <time.h> |
115 | 116 | ||
116 | #include <openssl/err.h> | 117 | #include <openssl/err.h> |
@@ -186,7 +187,7 @@ bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) | |||
186 | 187 | ||
187 | err: | 188 | err: |
188 | if (buf != NULL) { | 189 | if (buf != NULL) { |
189 | OPENSSL_cleanse(buf, bytes); | 190 | explicit_bzero(buf, bytes); |
190 | free(buf); | 191 | free(buf); |
191 | } | 192 | } |
192 | bn_check_top(rnd); | 193 | bn_check_top(rnd); |