diff options
author | 1999-11-05 07:09:07 +0000 | |
---|---|---|
committer | 1999-11-05 07:09:07 +0000 | |
commit | 172ef19e08b63ac4deb2ebce8fafcbbae7744c90 (patch) | |
tree | 5760de5d116961c22d9262ae5cb96740c68e89e1 | |
parent | Commit to pcmciadevs (or any other *devs) should be done in two steps, (diff) | |
download | wireguard-openbsd-172ef19e08b63ac4deb2ebce8fafcbbae7744c90.tar.xz wireguard-openbsd-172ef19e08b63ac4deb2ebce8fafcbbae7744c90.zip |
clear buffers used for encryption. ok: niels@
-rw-r--r-- | usr.bin/ssh/rsa.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/rsa.c b/usr.bin/ssh/rsa.c index 9bdde7d1049..2721b2a2a7a 100644 --- a/usr.bin/ssh/rsa.c +++ b/usr.bin/ssh/rsa.c @@ -35,7 +35,7 @@ Description of the RSA algorithm can be found e.g. from the following sources: */ #include "includes.h" -RCSID("$Id: rsa.c,v 1.6 1999/11/02 19:42:36 markus Exp $"); +RCSID("$Id: rsa.c,v 1.7 1999/11/05 07:09:07 markus Exp $"); #include "rsa.h" #include "ssh.h" @@ -128,6 +128,8 @@ rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA* key) BN_bin2bn(outbuf, len, out); + memset(outbuf, 0, len); + memset(inbuf, 0, len); xfree(outbuf); xfree(inbuf); } @@ -151,6 +153,8 @@ rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *key) BN_bin2bn(outbuf, len, out); + memset(outbuf, 0, len); + memset(inbuf, 0, len); xfree(outbuf); xfree(inbuf); } |