diff options
author | jsing <> | 2023-01-07 16:13:46 +0000 |
---|---|---|
committer | jsing <> | 2023-01-07 16:13:46 +0000 |
commit | 647a51042d43cddabf51a51f62a8a250a284f399 (patch) | |
tree | a7d65be014883dd452a6a0318abcc058642960f6 | |
parent | b8509fbf001a81e19a6a7143b220201c9a6e3d1f (diff) | |
download | openbsd-647a51042d43cddabf51a51f62a8a250a284f399.tar.gz openbsd-647a51042d43cddabf51a51f62a8a250a284f399.tar.bz2 openbsd-647a51042d43cddabf51a51f62a8a250a284f399.zip |
Flip BN_clear_free() and BN_free()
All of our BIGNUMs are cleared when we free them - move the code to
BN_free() and have BN_clear_free() call BN_free(), rather than the other
way around.
ok tb@
-rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index e8397cafda..70b6899a42 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.69 2023/01/07 16:09:18 jsing Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.70 2023/01/07 16:13:46 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 | * |
@@ -97,7 +97,7 @@ BN_clear(BIGNUM *a) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | void | 99 | void |
100 | BN_clear_free(BIGNUM *a) | 100 | BN_free(BIGNUM *a) |
101 | { | 101 | { |
102 | int i; | 102 | int i; |
103 | 103 | ||
@@ -112,9 +112,9 @@ BN_clear_free(BIGNUM *a) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | void | 114 | void |
115 | BN_free(BIGNUM *a) | 115 | BN_clear_free(BIGNUM *bn) |
116 | { | 116 | { |
117 | BN_clear_free(a); | 117 | BN_free(bn); |
118 | } | 118 | } |
119 | 119 | ||
120 | /* This stuff appears to be completely unused, so is deprecated */ | 120 | /* This stuff appears to be completely unused, so is deprecated */ |