summaryrefslogtreecommitdiff
path: root/rsa.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-03-20 00:32:39 +0000
committerColin Watson <cjwatson@debian.org>2014-03-20 00:34:16 +0000
commit2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch)
tree86848a7668424b392d48791a0e41e05f9df7b62b /rsa.c
parentc9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff)
parent9cbb60f5e4932634db04c330c88abc49cc5567bd (diff)
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'rsa.c')
-rw-r--r--rsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rsa.c b/rsa.c
index a9ee6b0ed..d0b5bbf5e 100644
--- a/rsa.c
+++ b/rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.c,v 1.30 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: rsa.c,v 1.31 2014/02/02 03:44:31 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -94,8 +94,8 @@ rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key)
94 if (BN_bin2bn(outbuf, len, out) == NULL) 94 if (BN_bin2bn(outbuf, len, out) == NULL)
95 fatal("rsa_public_encrypt: BN_bin2bn failed"); 95 fatal("rsa_public_encrypt: BN_bin2bn failed");
96 96
97 memset(outbuf, 0, olen); 97 explicit_bzero(outbuf, olen);
98 memset(inbuf, 0, ilen); 98 explicit_bzero(inbuf, ilen);
99 free(outbuf); 99 free(outbuf);
100 free(inbuf); 100 free(inbuf);
101} 101}
@@ -120,8 +120,8 @@ rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *key)
120 if (BN_bin2bn(outbuf, len, out) == NULL) 120 if (BN_bin2bn(outbuf, len, out) == NULL)
121 fatal("rsa_private_decrypt: BN_bin2bn failed"); 121 fatal("rsa_private_decrypt: BN_bin2bn failed");
122 } 122 }
123 memset(outbuf, 0, olen); 123 explicit_bzero(outbuf, olen);
124 memset(inbuf, 0, ilen); 124 explicit_bzero(inbuf, ilen);
125 free(outbuf); 125 free(outbuf);
126 free(inbuf); 126 free(inbuf);
127 return len; 127 return len;