summaryrefslogtreecommitdiff
path: root/src/pluto/pkcs1.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-03-30 08:38:54 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-03-30 08:38:54 +0000
commit113868f64840631a2b10a2e8987268f2c6566552 (patch)
tree087c05184fd083ca653d1b85bd10c3c51361bb4a /src/pluto/pkcs1.c
parentc9e3aaf0657e98bc047486ba87edf1489a39ba94 (diff)
downloadvyos-strongswan-113868f64840631a2b10a2e8987268f2c6566552.tar.gz
vyos-strongswan-113868f64840631a2b10a2e8987268f2c6566552.zip
- New upstream release.
Diffstat (limited to 'src/pluto/pkcs1.c')
-rw-r--r--src/pluto/pkcs1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pluto/pkcs1.c b/src/pluto/pkcs1.c
index bb8afde0a..49a06a8bc 100644
--- a/src/pluto/pkcs1.c
+++ b/src/pluto/pkcs1.c
@@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: pkcs1.c 3252 2007-10-06 21:24:50Z andreas $
+ * RCSID $Id: pkcs1.c 3427 2008-01-27 20:17:15Z andreas $
*/
#include <stddef.h>
@@ -442,11 +442,13 @@ RSA_encrypt(const RSA_public_key_t *key, chunk_t in)
*pos++ = 0x02;
/* pad with pseudo random bytes unequal to zero */
- get_rnd_bytes(pos, padding);
for (i = 0; i < padding; i++)
{
+ get_rnd_bytes(pos, padding);
while (!*pos)
- get_rnd_bytes(pos, 1);
+ {
+ get_rnd_bytes(pos, 1);
+ }
pos++;
}