strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bb8fcc
)
fixed padding bug in RSA_encrypt()
author
Andreas Steffen
<andreas.steffen@strongswan.org>
Sun, 27 Jan 2008 20:17:15 +0000
(20:17 -0000)
committer
Andreas Steffen
<andreas.steffen@strongswan.org>
Sun, 27 Jan 2008 20:17:15 +0000
(20:17 -0000)
src/pluto/pkcs1.c
patch
|
blob
|
history
diff --git
a/src/pluto/pkcs1.c
b/src/pluto/pkcs1.c
index
f02dc29
..
bc07848
100644
(file)
--- a/
src/pluto/pkcs1.c
+++ b/
src/pluto/pkcs1.c
@@
-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++;
}