mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-30 00:00:23 -05:00
added openssl-ikev2/critical-extension scenario
This commit is contained in:
parent
32c19f1fe2
commit
2ecafc7316
@ -0,0 +1,5 @@
|
|||||||
|
A connection between the subnets behind the gateways <b>moon</b> and <b>sun</b> is set up.
|
||||||
|
The authentication is based on <b>X.509 certificates</b> which contain a <b>critical</b> but
|
||||||
|
unsupported 'strongSwan' extension. Whereas <b>moon</b> ignores unsupported critical
|
||||||
|
extensions by setting <b>libstrongswan.x509.enforce_critical = no</b> in strongswan.conf,
|
||||||
|
<b>sun</b> discards such certificates and aborts the connection setup.
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
moon::cat /var/log/daemon.log::sending end entity cert::YES
|
||||||
|
moon::cat /var/log/daemon.log::received AUTHENTICATION_FAILED notify error::YES
|
||||||
|
sun::cat /var/log/daemon.log::found unsupported critical X.509 extension::YES
|
||||||
|
sun::cat /var/log/daemon.log::building CRED_CERTIFICATE - ANY failed::YES
|
||||||
|
sun::cat /var/log/daemon.log::loading certificate from 'sunCert.der' failed::YES
|
||||||
|
sun::cat /var/log/daemon.log::building CRED_CERTIFICATE - X509 failed::YES
|
||||||
25
testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/ipsec.conf
Executable file
25
testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/ipsec.conf
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
mobike=no
|
||||||
|
|
||||||
|
conn net-net
|
||||||
|
left=PH_IP_MOON
|
||||||
|
leftcert=moonCert.der
|
||||||
|
leftid=@moon.strongswan.org
|
||||||
|
leftsubnet=10.1.0.0/16
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_SUN
|
||||||
|
rightid=@sun.strongswan.org
|
||||||
|
rightsubnet=10.2.0.0/16
|
||||||
|
auto=add
|
||||||
Binary file not shown.
@ -0,0 +1,12 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl pem pkcs1 random openssl revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
multiple_authentication = no
|
||||||
|
}
|
||||||
|
|
||||||
|
libstrongswan {
|
||||||
|
x509 {
|
||||||
|
enforce_critical = no
|
||||||
|
}
|
||||||
|
}
|
||||||
25
testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/ipsec.conf
Executable file
25
testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/ipsec.conf
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
mobike=no
|
||||||
|
|
||||||
|
conn net-net
|
||||||
|
left=PH_IP_SUN
|
||||||
|
leftcert=sunCert.der
|
||||||
|
leftid=@sun.strongswan.org
|
||||||
|
leftsubnet=10.2.0.0/16
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightid=@moon.strongswan.org
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
auto=add
|
||||||
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl pem pkcs1 random openssl revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
multiple_authentication = no
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
moon::ipsec stop
|
||||||
|
sun::ipsec stop
|
||||||
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
moon::ipsec start
|
||||||
|
sun::ipsec start
|
||||||
|
moon::sleep 1
|
||||||
|
moon::ipsec up net-net
|
||||||
21
testing/tests/openssl-ikev2/critical-extension/test.conf
Normal file
21
testing/tests/openssl-ikev2/critical-extension/test.conf
Normal file
@ -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="alice moon winnetou sun bob"
|
||||||
|
|
||||||
|
# Corresponding block diagram
|
||||||
|
#
|
||||||
|
DIAGRAM="a-m-w-s-b.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 sun"
|
||||||
Loading…
x
Reference in New Issue
Block a user