summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_saos.c
diff options
context:
space:
mode:
authorbeck <>2017-04-28 22:46:40 +0000
committerbeck <>2017-04-28 22:46:40 +0000
commit1a022d2b7f958fffe8e920e5510d226f01a2b3d0 (patch)
tree3d1f17028c1d6966d7d9ab06847304c2fbde6b98 /src/lib/libcrypto/rsa/rsa_saos.c
parentf3ff740b7de3b8362cbe53c139cf85019ce7378c (diff)
downloadopenbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.tar.gz
openbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.tar.bz2
openbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.zip
revert previous accidental commit
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c
index 50522b972a..10184b6c18 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.21 2017/04/28 22:38:51 beck Exp $ */ 1/* $OpenBSD: rsa_saos.c,v 1.22 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 *
@@ -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 freezero(s, (unsigned int)j + 1); 99 explicit_bzero(s, (unsigned int)j + 1);
100 100 free(s);
101 return ret; 101 return ret;
102} 102}
103 103
@@ -137,7 +137,9 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m,
137 ret = 1; 137 ret = 1;
138err: 138err:
139 ASN1_OCTET_STRING_free(sig); 139 ASN1_OCTET_STRING_free(sig);
140 freezero(s, siglen); 140 if (s != NULL) {
141 141 explicit_bzero(s, (unsigned int)siglen);
142 free(s);
143 }
142 return ret; 144 return ret;
143} 145}