summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_sign.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_sign.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c
index 52cbc3dfe3..618ec155cc 100644
--- a/src/lib/libcrypto/rsa/rsa_sign.c
+++ b/src/lib/libcrypto/rsa/rsa_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_sign.c,v 1.26 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: rsa_sign.c,v 1.27 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 *
@@ -135,10 +135,9 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len,
135 else 135 else
136 *siglen = i; 136 *siglen = i;
137 137
138 if (type != NID_md5_sha1) { 138 if (type != NID_md5_sha1)
139 explicit_bzero(tmps, (unsigned int)j + 1); 139 freezero(tmps, (unsigned int)j + 1);
140 free(tmps); 140
141 }
142 return (ret); 141 return (ret);
143} 142}
144 143
@@ -234,10 +233,9 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
234err: 233err:
235 if (sig != NULL) 234 if (sig != NULL)
236 X509_SIG_free(sig); 235 X509_SIG_free(sig);
237 if (s != NULL) { 236
238 explicit_bzero(s, (unsigned int)siglen); 237 freezero(s, (unsigned int)siglen);
239 free(s); 238
240 }
241 return ret; 239 return ret;
242} 240}
243 241