diff options
Diffstat (limited to 'src/pluto')
-rw-r--r-- | src/pluto/Makefile.in | 2 | ||||
-rw-r--r-- | src/pluto/asn1.c | 24 | ||||
-rw-r--r-- | src/pluto/pkcs1.c | 8 | ||||
-rw-r--r-- | src/pluto/vendor.c | 5 | ||||
-rw-r--r-- | src/pluto/vendor.h | 3 |
5 files changed, 29 insertions, 13 deletions
diff --git a/src/pluto/Makefile.in b/src/pluto/Makefile.in index 77a0a7548..a9ae01d65 100644 --- a/src/pluto/Makefile.in +++ b/src/pluto/Makefile.in @@ -237,11 +237,13 @@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ piddir = @piddir@ +plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +simreader = @simreader@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ diff --git a/src/pluto/asn1.c b/src/pluto/asn1.c index 0e50b8211..7436d4d1a 100644 --- a/src/pluto/asn1.c +++ b/src/pluto/asn1.c @@ -11,7 +11,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * RCSID $Id: asn1.c 3252 2007-10-06 21:24:50Z andreas $ + * RCSID $Id: asn1.c 3451 2008-02-05 19:27:05Z andreas $ */ #include <stdlib.h> @@ -758,13 +758,23 @@ is_asn1(chunk_t blob) ) return FALSE; } + len = asn1_length(&blob); - if (len != blob.len) + + /* exact match */ + if (len == blob.len) { - DBG(DBG_PARSING, - DBG_log(" file size does not match ASN.1 coded length"); - ) - return FALSE; + return TRUE; } - return TRUE; + + /* some websites append a surplus newline character to the blob */ + if (len + 1 == blob.len && *(blob.ptr + len) == '\n') + { + return TRUE; + } + + DBG(DBG_PARSING, + DBG_log(" file size does not match ASN.1 coded length"); + ) + return FALSE; } 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++; } diff --git a/src/pluto/vendor.c b/src/pluto/vendor.c index 0e6e3d9b7..c31a4195b 100644 --- a/src/pluto/vendor.c +++ b/src/pluto/vendor.c @@ -11,7 +11,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * RCSID $Id: vendor.c 3380 2007-12-04 23:54:32Z andreas $ + * RCSID $Id: vendor.c 3472 2008-02-14 21:26:21Z andreas $ */ #include <stdlib.h> @@ -206,7 +206,8 @@ static struct vid_struct _vid_tab[] = { /* * strongSwan */ - DEC_MD5_VID(STRONGSWAN, "strongSwan 4.1.10") + DEC_MD5_VID(STRONGSWAN, "strongSwan 4.1.11") + DEC_MD5_VID(STRONGSWAN_4_1_10,"strongSwan 4.1.10") DEC_MD5_VID(STRONGSWAN_4_1_9, "strongSwan 4.1.9") DEC_MD5_VID(STRONGSWAN_4_1_8, "strongSwan 4.1.8") DEC_MD5_VID(STRONGSWAN_4_1_7, "strongSwan 4.1.7") diff --git a/src/pluto/vendor.h b/src/pluto/vendor.h index d0853b08c..03d2fde77 100644 --- a/src/pluto/vendor.h +++ b/src/pluto/vendor.h @@ -11,7 +11,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * RCSID $Id: vendor.h 3380 2007-12-04 23:54:32Z andreas $ + * RCSID $Id: vendor.h 3413 2007-12-24 18:07:55Z andreas $ */ #ifndef _VENDOR_H_ @@ -113,6 +113,7 @@ enum known_vendorid { VID_STRONGSWAN_4_1_7 = 95, VID_STRONGSWAN_4_1_8 = 96, VID_STRONGSWAN_4_1_9 = 97, + VID_STRONGSWAN_4_1_10 = 98, /* 101 - 200 : NAT-Traversal */ VID_NATT_STENBERG_01 =101, |