diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index 179217c236..50522b972a 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_saos.c,v 1.20 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: rsa_saos.c,v 1.21 2017/04/28 22:38:51 beck 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 | * |
@@ -96,8 +96,8 @@ RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, | |||
96 | else | 96 | else |
97 | *siglen = i; | 97 | *siglen = i; |
98 | 98 | ||
99 | explicit_bzero(s, (unsigned int)j + 1); | 99 | freezero(s, (unsigned int)j + 1); |
100 | free(s); | 100 | |
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | 103 | ||
@@ -137,9 +137,7 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, | |||
137 | ret = 1; | 137 | ret = 1; |
138 | err: | 138 | err: |
139 | ASN1_OCTET_STRING_free(sig); | 139 | ASN1_OCTET_STRING_free(sig); |
140 | if (s != NULL) { | 140 | freezero(s, siglen); |
141 | explicit_bzero(s, (unsigned int)siglen); | 141 | |
142 | free(s); | ||
143 | } | ||
144 | return ret; | 142 | return ret; |
145 | } | 143 | } |