/testing/guestbin/swan-prep --x509
Preparing X.509 files
west #
 ipsec certutil -D -n road
west #
 ipsec certutil -D -n east
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add nss-cert-incorrect
"nss-cert-incorrect": added IKEv2 connection
west #
 ipsec auto --add nss-cert-correct
"nss-cert-correct": added IKEv2 connection
west #
 ipsec whack --impair suppress_retransmits
west #
 echo "initdone"
initdone
west #
 # the impair causes memory corruption and a crash ?
west #
 ipsec whack --impair suppress_retransmits
west #
 # should succeed
west #
 ipsec auto --up nss-cert-correct
"nss-cert-correct" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"nss-cert-correct" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"nss-cert-correct" #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
"nss-cert-correct" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"nss-cert-correct" #1: initiator established IKE SA; authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 3nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"nss-cert-correct" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.254/32===192.0.2.254/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec auto --down nss-cert-correct
"nss-cert-correct": terminating SAs using this connection
"nss-cert-correct" #1: sent INFORMATIONAL request to delete IKE SA
"nss-cert-correct" #2: ESP traffic information: in=0B out=0B
"nss-cert-correct" #1: deleting IKE SA (established IKE SA)
west #
 # should fail on mismatched ID
west #
 ipsec auto --up nss-cert-incorrect
"nss-cert-incorrect" #3: initiating IKEv2 connection to 192.1.2.23 using UDP
"nss-cert-incorrect" #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"nss-cert-incorrect" #3: 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
"nss-cert-incorrect" #3: sent IKE_AUTH request to 192.1.2.23:UDP/500
"nss-cert-incorrect" #3: X509: authentication failed; peer ID_DER_ASN1_DN 'E=user-east@testing.libreswan.org,CN=east.testing.libreswan.org,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA' does not match expected 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, E=user-road@testing.libreswan.org'
"nss-cert-incorrect" #3: deleting IKE SA (IKE_AUTH_I) and sending notification
"nss-cert-incorrect" #4: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
west #
 echo done
done
west #
 
