summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c
index d0cb49cd1e..7cc76c1e85 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lib.c
+++ b/src/lib/libssl/src/crypto/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;