/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 echo "initdone"
initdone
west #
 # AES: key-length required
west #
 # send AES_128; should work
west #
 ipsec whack --impair suppress-retransmits
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #1: initiating IKEv2 connection
1v2 "aes128" #1: sent IKE_SA_INIT request to 192.1.2.23:500
1v2 "aes128" #1: sent IKE_AUTH request {cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "aes128" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
004 "aes128" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
up
002 "aes128": terminating SAs using this connection
002 "aes128" #1: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
005 "aes128" #2: ESP traffic information: in=84B out=84B
002 "aes128": terminating SAs using this connection
west #
 ipsec whack --impair none
west #
 # send AES_0
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair ike-key-length-attribute:0
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #3: initiating IKEv2 connection
002 "aes128" #3: IMPAIR: emitting fixed-length key-length attribute with 0 key
1v2 "aes128" #3: sent IKE_SA_INIT request to 192.1.2.23:500
003 "aes128" #3: dropping unexpected IKE_SA_INIT message containing NO_PROPOSAL_CHOSEN notification; message payloads: N; missing payloads: SA,KE,Ni
002 "aes128" #3: IMPAIR: retransmit so deleting SA
002 "aes128" #3: deleting state (STATE_V2_PARENT_I1) and NOT sending notification
002 "aes128" #3: deleting IKE SA but connection is supposed to remain up; schedule EVENT_REVIVE_CONNS
west #
 ipsec whack --impair none
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair child-key-length-attribute:0
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #5: initiating IKEv2 connection
1v2 "aes128" #5: sent IKE_SA_INIT request to 192.1.2.23:500
002 "aes128" #5: IMPAIR: emitting fixed-length key-length attribute with 0 key
1v2 "aes128" #5: sent IKE_AUTH request {cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "aes128" #5: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
003 "aes128" #6: IKE_AUTH response rejected Child SA with NO_PROPOSAL_CHOSEN
west #
 ipsec whack --impair none
west #
 # send AES_128_128; will work but probably should not
west #
 ipsec whack --impair suppress-retransmits
west #
 ipsec whack --impair ike-key-length-attribute:duplicate
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #7: initiating IKEv2 connection
002 "aes128" #7: IMPAIR: duplicating key-length attribute
1v2 "aes128" #7: sent IKE_SA_INIT request to 192.1.2.23:500
1v2 "aes128" #7: sent IKE_AUTH request {cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "aes128" #7: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
004 "aes128" #8: initiator established Child SA using #7; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
up
002 "aes128": terminating SAs using this connection
002 "aes128" #7: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
005 "aes128" #8: ESP traffic information: in=84B out=84B
002 "aes128": terminating SAs using this connection
west #
 ipsec whack --impair none
west #
 ipsec whack --impair suppress-retransmits
west #
 ipsec whack --impair child-key-length-attribute:duplicate
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #9: initiating IKEv2 connection
1v2 "aes128" #9: sent IKE_SA_INIT request to 192.1.2.23:500
002 "aes128" #9: IMPAIR: duplicating key-length attribute
1v2 "aes128" #9: sent IKE_AUTH request {cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "aes128" #9: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
004 "aes128" #10: initiator established Child SA using #9; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
up
002 "aes128": terminating SAs using this connection
002 "aes128" #9: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
005 "aes128" #10: ESP traffic information: in=84B out=84B
002 "aes128": terminating SAs using this connection
west #
 ipsec whack --impair none
west #
 # send AES; should fail
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair ike-key-length-attribute:omit
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #11: initiating IKEv2 connection
002 "aes128" #11: IMPAIR: omitting fixed-size key-length attribute
1v2 "aes128" #11: sent IKE_SA_INIT request to 192.1.2.23:500
003 "aes128" #11: dropping unexpected IKE_SA_INIT message containing NO_PROPOSAL_CHOSEN notification; message payloads: N; missing payloads: SA,KE,Ni
002 "aes128" #11: IMPAIR: retransmit so deleting SA
002 "aes128" #11: deleting state (STATE_V2_PARENT_I1) and NOT sending notification
002 "aes128" #11: deleting IKE SA but connection is supposed to remain up; schedule EVENT_REVIVE_CONNS
west #
 ipsec whack --impair none
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair child-key-length-attribute:omit
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #13: initiating IKEv2 connection
1v2 "aes128" #13: sent IKE_SA_INIT request to 192.1.2.23:500
002 "aes128" #13: IMPAIR: omitting fixed-size key-length attribute
1v2 "aes128" #13: sent IKE_AUTH request {cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "aes128" #13: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
003 "aes128" #14: IKE_AUTH response rejected Child SA with NO_PROPOSAL_CHOSEN
west #
 ipsec whack --impair none
west #
 # send AES_<>; should fail
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair emitting
west #
 ipsec whack --impair ike-key-length-attribute:empty
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #15: initiating IKEv2 connection
002 "aes128" #15: IMPAIR: emitting variable-size key-length attribute with no key
002 "aes128" #15: IMPAIR: emitting af+type of IKEv2 Attribute Substructure Payload has an unknown value: 0x0+14 (0xe)
1v2 "aes128" #15: sent IKE_SA_INIT request to 192.1.2.23:500
003 "aes128" #15: dropping unexpected IKE_SA_INIT message containing INVALID_SYNTAX notification; message payloads: N; missing payloads: SA,KE,Ni
002 "aes128" #15: IMPAIR: retransmit so deleting SA
002 "aes128" #15: deleting state (STATE_V2_PARENT_I1) and NOT sending notification
002 "aes128" #15: deleting IKE SA but connection is supposed to remain up; schedule EVENT_REVIVE_CONNS
west #
 ipsec whack --impair none
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair emitting
west #
 ipsec whack --impair ike-key-length-attribute:empty
west #
 ../../guestbin/libreswan-up-down.sh aes128 -I 192.0.1.254 192.0.2.254
002 "aes128": added IKEv2 connection
1v2 "aes128" #17: initiating IKEv2 connection
002 "aes128" #17: IMPAIR: emitting variable-size key-length attribute with no key
002 "aes128" #17: IMPAIR: emitting af+type of IKEv2 Attribute Substructure Payload has an unknown value: 0x0+14 (0xe)
1v2 "aes128" #17: sent IKE_SA_INIT request to 192.1.2.23:500
003 "aes128" #17: dropping unexpected IKE_SA_INIT message containing INVALID_SYNTAX notification; message payloads: N; missing payloads: SA,KE,Ni
002 "aes128" #17: IMPAIR: retransmit so deleting SA
002 "aes128" #17: deleting state (STATE_V2_PARENT_I1) and NOT sending notification
002 "aes128" #17: deleting IKE SA but connection is supposed to remain up; schedule EVENT_REVIVE_CONNS
west #
 ipsec whack --impair none
west #
 # send 3DES; should work, key-length should be omitted
west #
 ipsec whack --impair suppress-retransmits
west #
 ../../guestbin/libreswan-up-down.sh 3des -I 192.0.1.254 192.0.2.254
002 "3des": added IKEv2 connection
1v2 "3des" #19: initiating IKEv2 connection
1v2 "3des" #19: sent IKE_SA_INIT request to 192.1.2.23:500
1v2 "3des" #19: sent IKE_AUTH request {cipher=3DES_CBC_192 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "3des" #19: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
004 "3des" #20: initiator established Child SA using #19; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=3DES_CBC-HMAC_SHA1_96 DPD=passive}
up
002 "3des": terminating SAs using this connection
002 "3des" #19: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
005 "3des" #20: ESP traffic information: in=84B out=84B
002 "3des": terminating SAs using this connection
west #
 ipsec whack --impair none
west #
 # send 3DES_0; should fail (but doesn't)
west #
 ipsec whack --impair suppress-retransmits
west #
 ipsec whack --impair ike-key-length-attribute:0
west #
 ../../guestbin/libreswan-up-down.sh 3des -I 192.0.1.254 192.0.2.254
002 "3des": added IKEv2 connection
1v2 "3des" #21: initiating IKEv2 connection
002 "3des" #21: IMPAIR: emitting fixed-length key-length attribute with 0 key
1v2 "3des" #21: sent IKE_SA_INIT request to 192.1.2.23:500
1v2 "3des" #21: sent IKE_AUTH request {cipher=3DES_CBC_192 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP2048}
003 "3des" #21: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
004 "3des" #22: initiator established Child SA using #21; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=3DES_CBC-HMAC_SHA1_96 DPD=passive}
up
002 "3des": terminating SAs using this connection
002 "3des" #21: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
005 "3des" #22: ESP traffic information: in=84B out=84B
002 "3des": terminating SAs using this connection
west #
 ipsec whack --impair none
west #
 # send 3DES_192; should work (but doesn't)
west #
 ipsec whack --impair delete-on-retransmit
west #
 ipsec whack --impair ike-key-length-attribute:192
west #
 ../../guestbin/libreswan-up-down.sh 3des -I 192.0.1.254 192.0.2.254
002 "3des": added IKEv2 connection
1v2 "3des" #23: initiating IKEv2 connection
002 "3des" #23: IMPAIR: emitting fixed-length key-length attribute with 192 key
1v2 "3des" #23: sent IKE_SA_INIT request to 192.1.2.23:500
003 "3des" #23: dropping unexpected IKE_SA_INIT message containing NO_PROPOSAL_CHOSEN notification; message payloads: N; missing payloads: SA,KE,Ni
002 "3des" #23: IMPAIR: retransmit so deleting SA
002 "3des" #23: deleting state (STATE_V2_PARENT_I1) and NOT sending notification
002 "3des" #23: deleting IKE SA but connection is supposed to remain up; schedule EVENT_REVIVE_CONNS
west #
 ipsec whack --impair none
west #
 echo done
done
west #
 grep INVALID_KEY_INFORMATION /tmp/pluto.log
west #
 
