/testing/guestbin/swan-prep --x509
Preparing X.509 files
east #
 ipsec certutil -D -n west
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 ../../guestbin/ipsec-add.sh distraction resume-distraction any-east
"distraction": bad left CA string 'Something bogus': unknown OID in ID_DER_ASN1_DN (ignored)
"distraction": added IKEv2 connection
"resume-distraction": bad left CA string 'Something bogus': unknown OID in ID_DER_ASN1_DN (ignored)
"resume-distraction": added IKEv2 connection
"any-east": added IKEv2 connection
east #
 echo "initdone"
initdone
east #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.2.23 dst 192.1.2.45
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
src 192.1.2.45 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
east #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.1.2.23/32 dst 192.1.2.45/32
	dir out priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.2.45
		proto esp reqid REQID mode tunnel
src 192.1.2.45/32 dst 192.1.2.23/32
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.2.45 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.2.45/32 dst 192.1.2.23/32
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.45 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
east #
 # on east should see IKE_AUTH switch from distraction to any-east and
east #
 # then the IKE_SESSION_RESUME switch from resume-distraction to
east #
 # any-east.
east #
 grep -e ': switched to ' /tmp/pluto.log
"distraction"[1] 192.1.2.45 #1: switched to "any-east"[1] 192.1.2.45
"resume-distraction"[1] 192.1.2.45 #3: switched to "any-east"[2] 192.1.2.45
east #
 
