diff options
author | 2017-04-28 22:38:51 +0000 | |
---|---|---|
committer | 2017-04-28 22:38:51 +0000 | |
commit | 70d49ca54fc2e88b73c3dbb6a1a7d213e3dd8609 (patch) | |
tree | 320a615e0937a06d20dd899810e12f8e04619968 /lib/libcrypto/rsa/rsa_sign.c | |
parent | Quiet a clang warning from -Wstring-plus-int. OK naddy@ (diff) | |
download | wireguard-openbsd-70d49ca54fc2e88b73c3dbb6a1a7d213e3dd8609.tar.xz wireguard-openbsd-70d49ca54fc2e88b73c3dbb6a1a7d213e3dd8609.zip |
*** empty log message ***
Diffstat (limited to 'lib/libcrypto/rsa/rsa_sign.c')
-rw-r--r-- | lib/libcrypto/rsa/rsa_sign.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/libcrypto/rsa/rsa_sign.c b/lib/libcrypto/rsa/rsa_sign.c index 52cbc3dfe35..618ec155cc3 100644 --- a/lib/libcrypto/rsa/rsa_sign.c +++ b/lib/libcrypto/rsa/rsa_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_sign.c,v 1.26 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: rsa_sign.c,v 1.27 2017/04/28 22:38:51 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -135,10 +135,9 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len, else *siglen = i; - if (type != NID_md5_sha1) { - explicit_bzero(tmps, (unsigned int)j + 1); - free(tmps); - } + if (type != NID_md5_sha1) + freezero(tmps, (unsigned int)j + 1); + return (ret); } @@ -234,10 +233,9 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, err: if (sig != NULL) X509_SIG_free(sig); - if (s != NULL) { - explicit_bzero(s, (unsigned int)siglen); - free(s); - } + + freezero(s, (unsigned int)siglen); + return ret; } |