summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_saos.c
diff options
context:
space:
mode:
authorbeck <>2017-04-28 22:38:51 +0000
committerbeck <>2017-04-28 22:38:51 +0000
commit56efd82fd673bfdc68211c3fedb80c9ce8fdf05b (patch)
treecbc1f0f81b292f59a4de3cce8e808ae7e8f1ac30 /src/lib/libcrypto/rsa/rsa_saos.c
parentfe7bbe3c3bf529f35488281aa8cb0ed03a308a6d (diff)
downloadopenbsd-56efd82fd673bfdc68211c3fedb80c9ce8fdf05b.tar.gz
openbsd-56efd82fd673bfdc68211c3fedb80c9ce8fdf05b.tar.bz2
openbsd-56efd82fd673bfdc68211c3fedb80c9ce8fdf05b.zip
*** empty log message ***
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c12
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;
138err: 138err:
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}