/testing/guestbin/swan-prep
west #
 ipsec pk12util -W foobar -K '' -i /testing/x509/selfsigned/west-selfsigned.p12
pk12util: no nickname for cert in PKCS12 file.
pk12util: using nickname: west-selfsigned.testing.libreswan.org
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 ipsec pk12util -W foobar -K '' -i /testing/x509/selfsigned/east-selfsigned.p12
pk12util: no nickname for cert in PKCS12 file.
pk12util: using nickname: east-selfsigned.testing.libreswan.org
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 ipsec pk12util -W foobar -K '' -i /testing/x509/selfsigned/road-selfsigned.p12
pk12util: no nickname for cert in PKCS12 file.
pk12util: using nickname: road-selfsigned.testing.libreswan.org
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add west-x509
"west-x509": added IKEv2 connection
west #
 ipsec auto --add road-x509
"road-x509": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 ipsec auto --up west-x509
"west-x509" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"west-x509" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"west-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
"west-x509" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500; Child SA #2 {ESP <0xESPESP}
"west-x509" #1: initiator established IKE SA; authenticated peer using preloaded certificate 'CN=east-selfsigned.testing.libreswan.org' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=east-selfsigned.testing.libreswan.org'
"west-x509" #2: initiator established Child SA using #1; IPsec tunnel [192.1.2.45/32===192.1.2.23/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec whack --impair timeout_on_retransmit
west #
 # this one should fail, as east is only expecting selfsigned cert of west, not road
west #
 ipsec auto --up road-x509
"road-x509" #3: initiating IKEv2 connection to 192.1.2.23 using UDP
"road-x509" #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"road-x509" #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
"road-x509" #3: sent IKE_AUTH request to 192.1.2.23:UDP/500; Child SA #4 {ESP <0xESPESP}
"road-x509" #3: IKE SA authentication request rejected by peer: AUTHENTICATION_FAILED
"road-x509" #3: encountered fatal error in state IKE_AUTH_I
"road-x509" #3: deleting IKE SA (sent IKE_AUTH request)
"road-x509" #3: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
west #
 echo "done"
done
west #
