From 7771780b387fba02411413052feb7eb8613f77c1 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Thu, 5 Apr 2007 17:18:15 +0000 Subject: [PATCH] added crl-from-cache --- .../ikev2/crl-from-cache/description.txt | 5 ++++ .../tests/ikev2/crl-from-cache/evaltest.dat | 8 +++++++ .../crl-from-cache/hosts/carol/etc/ipsec.conf | 24 +++++++++++++++++++ .../crl-from-cache/hosts/moon/etc/ipsec.conf | 23 ++++++++++++++++++ .../tests/ikev2/crl-from-cache/posttest.dat | 4 ++++ .../tests/ikev2/crl-from-cache/pretest.dat | 8 +++++++ testing/tests/ikev2/crl-from-cache/test.conf | 21 ++++++++++++++++ 7 files changed, 93 insertions(+) create mode 100644 testing/tests/ikev2/crl-from-cache/description.txt create mode 100644 testing/tests/ikev2/crl-from-cache/evaltest.dat create mode 100755 testing/tests/ikev2/crl-from-cache/hosts/carol/etc/ipsec.conf create mode 100755 testing/tests/ikev2/crl-from-cache/hosts/moon/etc/ipsec.conf create mode 100644 testing/tests/ikev2/crl-from-cache/posttest.dat create mode 100644 testing/tests/ikev2/crl-from-cache/pretest.dat create mode 100644 testing/tests/ikev2/crl-from-cache/test.conf diff --git a/testing/tests/ikev2/crl-from-cache/description.txt b/testing/tests/ikev2/crl-from-cache/description.txt new file mode 100644 index 000000000..17866f572 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/description.txt @@ -0,0 +1,5 @@ +By setting strictcrlpolicy=yes a strict CRL policy is enforced on +both roadwarrior carol and gateway moon. When carol initiates +an IPsec connection to moon, both VPN endpoints find a cached CRL in +their /etc/ipsec.d/crls/ directories which allows them to immediately verify +the certificate received from their peer. diff --git a/testing/tests/ikev2/crl-from-cache/evaltest.dat b/testing/tests/ikev2/crl-from-cache/evaltest.dat new file mode 100644 index 000000000..9aa53fb64 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/evaltest.dat @@ -0,0 +1,8 @@ +moon::cat /var/log/daemon.log::loading crl file::YES +carol::cat /var/log/daemon.log::loading crl file::YES +moon::ipsec status::rw.*ESTABLISHED::YES +carol::ipsec status::home.*ESTABLISHED::YES +moon::cat /var/log/auth.log::written crl file::NO +carol::cat /var/log/auth.log::written crl file::NO +moon::ipsec listcrls:: ok::YES +carol::ipsec listcrls:: ok::YES diff --git a/testing/tests/ikev2/crl-from-cache/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/crl-from-cache/hosts/carol/etc/ipsec.conf new file mode 100755 index 000000000..cea581bc2 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/hosts/carol/etc/ipsec.conf @@ -0,0 +1,24 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + crlcheckinterval=180 + strictcrlpolicy=yes + cachecrls=yes + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + +conn home + left=PH_IP_CAROL + leftnexthop=%direct + leftcert=carolCert.pem + leftid=carol@strongswan.org + right=PH_IP_MOON + rightsubnet=10.1.0.0/16 + rightid=@moon.strongswan.org + auto=add diff --git a/testing/tests/ikev2/crl-from-cache/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/crl-from-cache/hosts/moon/etc/ipsec.conf new file mode 100755 index 000000000..fe2179885 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/hosts/moon/etc/ipsec.conf @@ -0,0 +1,23 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + crlcheckinterval=180 + strictcrlpolicy=yes + cachecrls=yes + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + +conn rw + left=PH_IP_MOON + leftnexthop=%direct + leftcert=moonCert.pem + leftid=@moon.strongswan.org + leftsubnet=10.1.0.0/16 + right=%any + auto=add diff --git a/testing/tests/ikev2/crl-from-cache/posttest.dat b/testing/tests/ikev2/crl-from-cache/posttest.dat new file mode 100644 index 000000000..be17847c1 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/posttest.dat @@ -0,0 +1,4 @@ +moon::ipsec stop +carol::ipsec stop +moon::rm /etc/ipsec.d/crls/* +carol::rm /etc/ipsec.d/crls/* diff --git a/testing/tests/ikev2/crl-from-cache/pretest.dat b/testing/tests/ikev2/crl-from-cache/pretest.dat new file mode 100644 index 000000000..acdb265ed --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/pretest.dat @@ -0,0 +1,8 @@ +moon::wget -q http://crl.strongswan.org/strongswan.crl +moon::mv strongswan.crl /etc/ipsec.d/crls/5da7dd700651327ee7b66db3b5e5e060ea2e4def.crl +carol::wget -q http://crl.strongswan.org/strongswan.crl +carol::mv strongswan.crl /etc/ipsec.d/crls/5da7dd700651327ee7b66db3b5e5e060ea2e4def.crl +moon::ipsec start +carol::ipsec start +carol::sleep 2 +carol::ipsec up home diff --git a/testing/tests/ikev2/crl-from-cache/test.conf b/testing/tests/ikev2/crl-from-cache/test.conf new file mode 100644 index 000000000..2b240d895 --- /dev/null +++ b/testing/tests/ikev2/crl-from-cache/test.conf @@ -0,0 +1,21 @@ +#!/bin/bash +# +# This configuration file provides information on the +# UML instances used for this test + +# All UML instances that are required for this test +# +UMLHOSTS="moon carol winnetou" + +# Corresponding block diagram +# +DIAGRAM="m-c-w.png" + +# UML instances on which tcpdump is to be started +# +TCPDUMPHOSTS="" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="moon carol"