/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 rm -f /etc/ipsec.d/*.*
west #
 ipsec initnss > /dev/null 2> /dev/null
west #
 ipsec pk12util -i OUTPUT/nss/client.p12 -K 'foobar' -W 'foobar'
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 ipsec certutil -M -n cacert -t 'CT,,'
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add x509
"x509": added IKEv2 connection
west #
 ipsec auto --add x509-comma-comma
ipsec addconn: changing legacy ',,' to '\,' in rightid=CN=server, OU=Global,, Support,, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
"x509-comma-comma": added IKEv2 connection
west #
 # show both conns are interpreted with \,
west #
 ipsec status |grep idtype
"x509":   our idtype: ID_DER_ASN1_DN; our id=CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ; their idtype: ID_DER_ASN1_DN; their id=CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
"x509-comma-comma":   our idtype: ID_DER_ASN1_DN; our id=CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ; their idtype: ID_DER_ASN1_DN; their id=CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
west #
 echo "initdone"
initdone
west #
 ipsec status |grep OU=
"x509": 192.0.1.0/24===192.1.2.45[CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ]...192.1.2.23[CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ]===192.0.2.0/24; unrouted; my_ip=unset; their_ip=unset;
"x509":   our idtype: ID_DER_ASN1_DN; our id=CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ; their idtype: ID_DER_ASN1_DN; their id=CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
"x509-comma-comma": 192.0.1.0/24===192.1.2.45[CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ]...192.1.2.23[CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ]===192.0.2.0/24; unrouted; my_ip=unset; their_ip=unset;
"x509-comma-comma":   our idtype: ID_DER_ASN1_DN; our id=CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ; their idtype: ID_DER_ASN1_DN; their id=CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
west #
 ipsec auto --listall |grep OU=
       ID_DER_ASN1_DN 'CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ'
  subject: CN=client, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ
west #
 ipsec auto --up x509
"x509" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"x509" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"x509" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"x509" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"x509" #1: initiator established IKE SA; authenticated peer certificate 'CN=server, OU=Global\, Support\, Services, O=Test Example, L=Brno, ST=Moravia, C=CZ' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=cacert'
"x509" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 echo "done"
done
west #
 
