/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev2
"westnet-eastnet-ipv4-psk-ikev2": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 # send KE:0 (which is invalid)
west #
 # expect KE:0 in response
west #
 ipsec whack --impair none
west #
 ipsec whack --impair revival
west #
 ipsec whack --impair ke_payload:0
west #
 ipsec whack --impair suppress_retransmits
west #
 # DH should fail
west #
 ipsec auto --up westnet-eastnet-ipv4-psk-ikev2
"westnet-eastnet-ipv4-psk-ikev2" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"westnet-eastnet-ipv4-psk-ikev2" #1: IMPAIR: sending bogus KE (g^x) == 0 value to break DH calculations
"westnet-eastnet-ipv4-psk-ikev2" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"westnet-eastnet-ipv4-psk-ikev2" #1: NSS: shared key calculation using ECP failed: SEC_ERROR_INVALID_KEY: The key does not support the requested operation.
"westnet-eastnet-ipv4-psk-ikev2" #1: encountered fatal error in state STATE_V2_PARENT_I1
"westnet-eastnet-ipv4-psk-ikev2" #1: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"westnet-eastnet-ipv4-psk-ikev2" #1: IMPAIR: revival: skip scheduling revival event
"westnet-eastnet-ipv4-psk-ikev2" #1: deleting IKE SA (sent IKE_SA_INIT request)
west #
 # send valid KE
west #
 # expect KE:0 in response (which is invalid)
west #
 ipsec whack --impair none
west #
 ipsec whack --impair revival
west #
 ipsec whack --impair suppress_retransmits
west #
 # DH should fail
west #
 ipsec auto --up westnet-eastnet-ipv4-psk-ikev2
"westnet-eastnet-ipv4-psk-ikev2" #2: initiating IKEv2 connection to 192.1.2.23 using UDP
"westnet-eastnet-ipv4-psk-ikev2" #2: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"westnet-eastnet-ipv4-psk-ikev2" #2: NSS: shared key calculation using ECP failed: SEC_ERROR_INVALID_KEY: The key does not support the requested operation.
"westnet-eastnet-ipv4-psk-ikev2" #2: encountered fatal error in state STATE_V2_PARENT_I1
"westnet-eastnet-ipv4-psk-ikev2" #2: connection is supposed to remain up; revival attempt 2 scheduled in 5 seconds
"westnet-eastnet-ipv4-psk-ikev2" #2: IMPAIR: revival: skip scheduling revival event
"westnet-eastnet-ipv4-psk-ikev2" #2: deleting IKE SA (sent IKE_SA_INIT request)
west #
 echo done
done
west #
 grep -e v2N_INVALID_KE_PAYLOAD -e v2N_INVALID_SYNTAX -e SEC_ERROR /tmp/pluto.log | grep -v -e '^|'
"westnet-eastnet-ipv4-psk-ikev2" #1: NSS: shared key calculation using ECP failed: SEC_ERROR_INVALID_KEY: The key does not support the requested operation.
"westnet-eastnet-ipv4-psk-ikev2" #2: NSS: shared key calculation using ECP failed: SEC_ERROR_INVALID_KEY: The key does not support the requested operation.
west #
 
