Skip to content

Commit e259ff3

Browse files
committed
testing: migrated openssl-ikev2/critical-extension to swanctl
1 parent 97493cb commit e259ff3

File tree

13 files changed

+73
-18
lines changed

13 files changed

+73
-18
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
A connection between the subnets behind the gateways <b>moon</b> and <b>sun</b> is set up.
22
The authentication is based on <b>X.509 certificates</b> which contain a <b>critical</b> but
3-
unsupported 'strongSwan' extension. Whereas <b>moon</b> ignores unsupported critical
3+
unsupported 'strongSwan' extension. Whereas <b>moon</b> ignores unsupported critical
44
extensions by setting <b>libstrongswan.x509.enforce_critical = no</b> in strongswan.conf,
55
<b>sun</b> discards such certificates and aborts the connection setup.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
moon::cat /var/log/daemon.log::sending end entity cert::YES
22
moon::cat /var/log/daemon.log::received AUTHENTICATION_FAILED notify error::YES
33
sun:: cat /var/log/daemon.log::found unsupported critical X.509 extension::YES
4-
sun:: cat /var/log/daemon.log::building CRED_CERTIFICATE - ANY failed::YES
5-
sun:: cat /var/log/daemon.log::loading certificate from 'sunCert.der' failed::YES
64
sun:: cat /var/log/daemon.log::building CRED_CERTIFICATE - X509 failed::YES

testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/strongswan.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# /etc/strongswan.conf - strongSwan configuration file
22

33
charon {
4-
load = pem pkcs1 random nonce openssl revocation curl hmac stroke kernel-netlink socket-default updown
4+
load = random nonce pem pkcs1 openssl revocation curl vici kernel-netlink socket-default updown
55
multiple_authentication = no
6+
}
67

8+
libstrongswan {
79
x509 {
810
enforce_critical = no
911
}

testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/ipsec.d/private/moonKey.pem renamed to testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/swanctl/rsa/moonKey.pem

File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
connections {
2+
3+
gw-gw {
4+
local_addrs = 192.168.0.1
5+
remote_addrs = 192.168.0.2
6+
7+
local {
8+
auth = pubkey
9+
id = moon.strongswan.org
10+
}
11+
remote {
12+
auth = pubkey
13+
id = sun.strongswan.org
14+
}
15+
children {
16+
net-net {
17+
local_ts = 10.1.0.0/16
18+
remote_ts = 10.2.0.0/16
19+
esp_proposals = aes128gcm128-ecp256
20+
}
21+
}
22+
version = 2
23+
mobike = no
24+
proposals = aes128-sha256-ecp256
25+
}
26+
}

testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/ipsec.d/certs/moonCert.der renamed to testing/tests/openssl-ikev2/critical-extension/hosts/moon/etc/swanctl/x509/moonCert.der

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# /etc/strongswan.conf - strongSwan configuration file
22

33
charon {
4-
load = pem pkcs1 random nonce openssl curl revocation hmac stroke kernel-netlink socket-default updown
4+
load = random nonce pem pkcs1 openssl curl revocation vici kernel-netlink socket-default updown
55
multiple_authentication = no
66
}

testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/ipsec.d/private/sunKey.pem renamed to testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/swanctl/rsa/sunKey.pem

File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
connections {
2+
3+
gw-gw {
4+
local_addrs = 192.168.0.2
5+
remote_addrs = 192.168.0.1
6+
7+
local {
8+
auth = pubkey
9+
id = sun.strongswan.org
10+
}
11+
remote {
12+
auth = pubkey
13+
id = moon.strongswan.org
14+
}
15+
children {
16+
net-net {
17+
local_ts = 10.2.0.0/16
18+
remote_ts = 10.1.0.0/16
19+
esp_proposals = aes128gcm128-ecp256
20+
}
21+
}
22+
version = 2
23+
mobike = no
24+
proposals = aes128-sha256-ecp256
25+
}
26+
}

testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/ipsec.d/certs/sunCert.der renamed to testing/tests/openssl-ikev2/critical-extension/hosts/sun/etc/swanctl/x509/sunCert.der

File renamed without changes.

0 commit comments

Comments
 (0)