aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-08-17 07:20:27 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-08-17 07:20:27 +0000
commit0f9f19f54e90d8999ef24bf8084b216fc21a55d2 (patch)
treefeee0739e446f3320996c3a2d783a7f9d96a2909 /src/pluto
parent6a8521580902758a9ffc73de7a3b90284591050d (diff)
downloadstrongswan-0f9f19f54e90d8999ef24bf8084b216fc21a55d2.tar.bz2
strongswan-0f9f19f54e90d8999ef24bf8084b216fc21a55d2.tar.xz
fixed maximum path length info in match_requested_ca()
Diffstat (limited to 'src/pluto')
-rw-r--r--src/pluto/ca.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pluto/ca.c b/src/pluto/ca.c
index 878cf86c8..528531447 100644
--- a/src/pluto/ca.c
+++ b/src/pluto/ca.c
@@ -131,11 +131,21 @@ match_requested_ca(generalName_t *requested_ca, chunk_t our_ca, int *our_pathlen
if (trusted_ca(our_ca, requested_ca->name, &pathlen)
&& pathlen < *our_pathlen)
+ {
*our_pathlen = pathlen;
+ }
requested_ca = requested_ca->next;
}
- return *our_pathlen <= MAX_CA_PATH_LEN;
+ if (*our_pathlen > MAX_CA_PATH_LEN)
+ {
+ *our_pathlen = MAX_CA_PATH_LEN;
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
}
/*