/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev2-gcm-c
"westnet-eastnet-ipv4-psk-ikev2-gcm-c": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 ipsec auto --up westnet-eastnet-ipv4-psk-ikev2-gcm-c
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #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
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"westnet-eastnet-ipv4-psk-ikev2-gcm-c" #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 #
 MIN_IKEV2_NONCE_SHA2_512="32"
west #
 emit_nonce=$(sed -n -e 's/.* emitting \([0-9]*\) raw bytes of IKEv2 nonce .*$/\1/p' /tmp/pluto.log)
west #
 recv_nonce=$(expr $(grep -A 3 'parse IKEv2 Nonce Payload:' /tmp/pluto.log | sed -n -e 's/^.*length: \([^ ]\+\) .*$/\1/p') - 4)
west #
 echo "emitted nonce length (${emit_nonce}) should be >= minimum accepted nonce length for SHA2_512 (${MIN_IKEV2_NONCE_SHA2_512})"
emitted nonce length (32) should be >= minimum accepted nonce length for SHA2_512 (32)
west #
 test ${emit_nonce} -ge ${MIN_IKEV2_NONCE_SHA2_512} || echo failed
west #
 echo "received nonce length (${recv_nonce}) should be >= minimum accepted nonce length for SHA2_512 (${MIN_IKEV2_NONCE_SHA2_512})"
received nonce length (32) should be >= minimum accepted nonce length for SHA2_512 (32)
west #
 test ${recv_nonce} -ge ${MIN_IKEV2_NONCE_SHA2_512} || echo failed
west #
 echo done
done
west #
 
