summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/rsa.c')
-rw-r--r--usr.bin/ssh/rsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/rsa.c b/usr.bin/ssh/rsa.c
index 9788a016c27..fe1fd0b6494 100644
--- a/usr.bin/ssh/rsa.c
+++ b/usr.bin/ssh/rsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa.c,v 1.30 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: rsa.c,v 1.31 2014/02/02 03:44:31 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -91,8 +91,8 @@ rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key)
if (BN_bin2bn(outbuf, len, out) == NULL)
fatal("rsa_public_encrypt: BN_bin2bn failed");
- memset(outbuf, 0, olen);
- memset(inbuf, 0, ilen);
+ explicit_bzero(outbuf, olen);
+ explicit_bzero(inbuf, ilen);
free(outbuf);
free(inbuf);
}
@@ -117,8 +117,8 @@ rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *key)
if (BN_bin2bn(outbuf, len, out) == NULL)
fatal("rsa_private_decrypt: BN_bin2bn failed");
}
- memset(outbuf, 0, olen);
- memset(inbuf, 0, ilen);
+ explicit_bzero(outbuf, olen);
+ explicit_bzero(inbuf, ilen);
free(outbuf);
free(inbuf);
return len;