ocsp-no-signer-cert added
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 20 Apr 2007 14:49:50 +0000 (14:49 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 20 Apr 2007 14:49:50 +0000 (14:49 -0000)
testing/tests/ikev2/ocsp-no-signer-cert/description.txt [new file with mode: 0644]
testing/tests/ikev2/ocsp-no-signer-cert/evaltest.dat [new file with mode: 0644]
testing/tests/ikev2/ocsp-no-signer-cert/hosts/carol/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/ocsp-no-signer-cert/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/ocsp-no-signer-cert/hosts/winnetou/etc/openssl/ocsp/ocsp.cgi [new file with mode: 0755]
testing/tests/ikev2/ocsp-no-signer-cert/posttest.dat [new file with mode: 0644]
testing/tests/ikev2/ocsp-no-signer-cert/pretest.dat [new file with mode: 0644]
testing/tests/ikev2/ocsp-no-signer-cert/test.conf [new file with mode: 0644]

diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/description.txt b/testing/tests/ikev2/ocsp-no-signer-cert/description.txt
new file mode 100644 (file)
index 0000000..4fa492c
--- /dev/null
@@ -0,0 +1,5 @@
+By setting <b>strictcrlpolicy=yes</b>, a <b>strict</b> CRL policy is enforced on
+both roadwarrior <b>carol</b> and gateway <b>moon</b>. The online certificate status
+is checked via the OCSP server <b>winnetou</b> which is sending a normal host
+certificate not containing an OCSPSigning extended key usage flag. As a consequence
+the OCSP signing certificate is not accepted and the connection setup is aborted.
diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/evaltest.dat b/testing/tests/ikev2/ocsp-no-signer-cert/evaltest.dat
new file mode 100644 (file)
index 0000000..f185536
--- /dev/null
@@ -0,0 +1,5 @@
+moon::cat /var/log/daemon.log::received valid http response::YES
+moon::cat /var/log/daemon.log::received certificate is no ocsp signer - rejected::YES
+moon::cat /var/log/daemon.log::certificate status unknown::YES
+moon::ipsec status::rw.*ESTABLISHED::NO
+carol::ipsec status::home.*ESTABLISHED::NO
diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/ocsp-no-signer-cert/hosts/carol/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..3c685a8
--- /dev/null
@@ -0,0 +1,27 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       strictcrlpolicy=yes
+       plutostart=no
+
+ca strongswan
+       cacert=strongswanCert.pem
+       ocspuri=http://ocsp.strongswan.org:8880
+       auto=add
+
+conn %default
+       keyexchange=ikev2
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+
+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/ocsp-no-signer-cert/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/ocsp-no-signer-cert/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..e2fabe0
--- /dev/null
@@ -0,0 +1,26 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       strictcrlpolicy=yes
+       plutostart=no
+
+ca strongswan-ca
+       cacert=strongswanCert.pem
+       ocspuri=http://ocsp.strongswan.org:8880
+       auto=add
+
+conn %default
+       keyexchange=ikev2
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+
+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/ocsp-no-signer-cert/hosts/winnetou/etc/openssl/ocsp/ocsp.cgi b/testing/tests/ikev2/ocsp-no-signer-cert/hosts/winnetou/etc/openssl/ocsp/ocsp.cgi
new file mode 100755 (executable)
index 0000000..74d22b9
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+cd /etc/openssl
+
+echo "Content-type: application/ocsp-response"
+echo ""
+
+/usr/bin/openssl ocsp -index index.txt -CA strongswanCert.pem \
+                      -rkey winnetouKey.pem -rsigner winnetouCert.pem \
+                     -nmin 5 \
+                     -reqin /dev/stdin -respout /dev/stdout
diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/posttest.dat b/testing/tests/ikev2/ocsp-no-signer-cert/posttest.dat
new file mode 100644 (file)
index 0000000..c6d6235
--- /dev/null
@@ -0,0 +1,2 @@
+moon::ipsec stop
+carol::ipsec stop
diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/pretest.dat b/testing/tests/ikev2/ocsp-no-signer-cert/pretest.dat
new file mode 100644 (file)
index 0000000..d92333d
--- /dev/null
@@ -0,0 +1,4 @@
+moon::ipsec start
+carol::ipsec start
+carol::sleep 2
+carol::ipsec up home
diff --git a/testing/tests/ikev2/ocsp-no-signer-cert/test.conf b/testing/tests/ikev2/ocsp-no-signer-cert/test.conf
new file mode 100644 (file)
index 0000000..2b240d8
--- /dev/null
@@ -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"