summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_sign.c
diff options
context:
space:
mode:
authorbeck <>2017-04-28 22:46:40 +0000
committerbeck <>2017-04-28 22:46:40 +0000
commit0e8cbd9898a13fec69ddf5721cdf1137fe077ca5 (patch)
tree3d1f17028c1d6966d7d9ab06847304c2fbde6b98 /src/lib/libcrypto/rsa/rsa_sign.c
parent56efd82fd673bfdc68211c3fedb80c9ce8fdf05b (diff)
downloadopenbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.tar.gz
openbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.tar.bz2
openbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.zip
revert previous accidental commit
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_sign.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_sign.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c
index 618ec155cc..818b88c604 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.27 2017/04/28 22:38:51 beck Exp $ */ 1/* $OpenBSD: rsa_sign.c,v 1.28 2017/04/28 22:46:40 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,9 +135,10 @@ 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 freezero(tmps, (unsigned int)j + 1); 139 explicit_bzero(tmps, (unsigned int)j + 1);
140 140 free(tmps);
141 }
141 return (ret); 142 return (ret);
142} 143}
143 144
@@ -233,9 +234,10 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
233err: 234err:
234 if (sig != NULL) 235 if (sig != NULL)
235 X509_SIG_free(sig); 236 X509_SIG_free(sig);
236 237 if (s != NULL) {
237 freezero(s, (unsigned int)siglen); 238 explicit_bzero(s, (unsigned int)siglen);
238 239 free(s);
240 }
239 return ret; 241 return ret;
240} 242}
241 243