/testing/guestbin/swan-prep
west #
 setenforce 1
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add ikev2-ipsec-fail
"ikev2-ipsec-fail": added IKEv2 connection
west #
 #ipsec whack --impair timeout_on_retransmit
west #
 echo "initdone"
initdone
west #
 ipsec whack --impair revival
west #
 # ipsec fail tests
west #
 # See description of limitations of this test
west #
 ipsec auto --up ikev2-ipsec-fail
"ikev2-ipsec-fail" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"ikev2-ipsec-fail" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"ikev2-ipsec-fail" #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
"ikev2-ipsec-fail" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"ikev2-ipsec-fail" #1: initiator established IKE SA; authenticated peer using preloaded certificate '@east-v2' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature
"ikev2-ipsec-fail" #2: IKE_AUTH response rejected Child SA with TS_UNACCEPTABLE
"ikev2-ipsec-fail" #2: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"ikev2-ipsec-fail" #2: IMPAIR: revival: skip scheduling revival event
west #
 ipsec auto --delete ikev2-ipsec-fail
"ikev2-ipsec-fail": terminating SAs using this connection
"ikev2-ipsec-fail" #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
west #
 echo done
done
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 grep -E -i "IKE|ipsec-" /var/log/audit/audit.log
type=CRYPTO_IKE_SA msg=audit(XXX): pid=PID uid=0 auid=AUID ses=SES subj=system_u:system_r:unconfined_service_t:s0 msg='op=start direction=initiator conn-name="ikev2-ipsec-fail" connstate=1 ike-version=2.0 auth=RSA_SIG cipher=aes_gcm_16 ksize=256 integ=none prf=sha512 pfs=DH19 raddr=192.1.2.23 exe="PATH/libexec/ipsec/pluto" hostname=? addr=192.1.2.45 terminal=? res=success'^]UID="root" AUID="unset"
type=CRYPTO_IPSEC_SA msg=audit(XXX): pid=PID uid=0 auid=AUID ses=SES subj=system_u:system_r:unconfined_service_t:s0 msg='op=start conn-name="ikev2-ipsec-fail" connstate=2, satype=ipsec-policy samode=tunnel cipher=none ksize=0 integ=none in-spi=DEC(HEX) out-spi=DEC(HEX) in-spi=DEC(HEX) out-spi=DEC(HEX) raddr=192.1.2.23 exe="PATH/libexec/ipsec/pluto" hostname=? addr=192.1.2.45 terminal=? res=failed'^]UID="root" AUID="unset"
type=CRYPTO_IKE_SA msg=audit(XXX): pid=PID uid=0 auid=AUID ses=SES subj=system_u:system_r:unconfined_service_t:s0 msg='op=destroy direction=initiator conn-name="ikev2-ipsec-fail" connstate=1 ike-version=2.0 auth=RSA_SIG cipher=aes_gcm_16 ksize=256 integ=none prf=sha512 pfs=DH19 raddr=192.1.2.23 exe="PATH/libexec/ipsec/pluto" hostname=? addr=192.1.2.45 terminal=? res=success'^]UID="root" AUID="unset"
west #
 
