/testing/guestbin/swan-prep --x509
Preparing X.509 files
road #
 certutil -D -n east -d sql:/etc/ipsec.d
road #
 cp road-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf
road #
 cp policies/* /etc/ipsec.d/policies/
road #
 echo "192.1.2.0/24"  >> /etc/ipsec.d/policies/private-or-clear
road #
 ipsec restart
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress-retransmits
road #
 # give OE policies time to load
road #
 ../../guestbin/wait-for.sh --match 'loaded 2' -- ipsec auto --status
000 Total IPsec connections: loaded 2, active 0
road #
 echo "initdone"
initdone
road #
 # check traffic and shunt status
road #
 ipsec whack --trafficstatus
road #
 ipsec whack --shuntstatus
000 Bare Shunt list:
000  
road #
 # trigger ping, this will be lost
road #
 ../../guestbin/ping-once.sh --down -I 192.1.3.209 192.1.2.23
down
road #
 # ping should succeed through tunnel
road #
 ../../guestbin/ping-once.sh --up -I 192.1.3.209 192.1.2.23
up
road #
 ipsec whack --trafficstatus
006 #2: "private-or-clear#192.1.2.0/24"[1] 10.0.10.1/32=== ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org', lease=10.0.10.1/32
road #
 echo "waiting for road to restart client cleanly"
waiting for road to restart client cleanly
road #
 # restarting ipsec service; OE policies time to load
road #
 ipsec restart
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-for.sh --match 'loaded 2' -- ipsec auto --status
000 Total IPsec connections: loaded 2, active 0
road #
 # should be empty
road #
 ipsec status |grep STATE_
road #
 # restart ipsec; give OE conns time to load
road #
 ipsec restart
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 # should be empty
road #
 ipsec status |grep STATE_
road #
 # trigger ping, this will be lost
road #
 ../../guestbin/ping-once.sh --down -I 192.1.3.209 192.1.2.23
down
road #
 # ping should succeed through tunnel
road #
 ../../guestbin/ping-once.sh --up -I 192.1.3.209 192.1.2.23
up
road #
 ipsec whack --trafficstatus
006 #2: "private-or-clear#192.1.2.0/24"[1] 10.0.10.1/32=== ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org', lease=10.0.10.1/32
road #
 # A tunnel should have established with non-zero byte counters
road #
 ipsec whack --trafficstatus
006 #2: "private-or-clear#192.1.2.0/24"[1] 10.0.10.1/32=== ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org', lease=10.0.10.1/32
road #
 grep "negotiated connection" /tmp/pluto.log
"private-or-clear#192.1.2.0/24"[1] 10.0.10.1/32=== ...192.1.2.23 #2: negotiated connection [10.0.10.1-10.0.10.1:0-65535 0] -> [192.1.2.23-192.1.2.23:0-65535 0]
road #
 grep -e 'auth method: ' -e 'hash algorithm identifier' -e ': authenticated using ' OUTPUT/*pluto.log
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256: 00 02
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384: 00 03
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512: 00 04
OUTPUT/east.pluto.log:|    auth method: IKEv2_AUTH_NULL (0xd)
OUTPUT/east.pluto.log:"clear-or-private#192.1.2.254/32"[1] ...192.1.2.254 #1: authenticated using authby=null and peer ID_NULL 'ID_NULL'
OUTPUT/east.pluto.log:|    auth method: IKEv2_AUTH_DIGSIG (0xe)
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256: 00 02
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384: 00 03
OUTPUT/east.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512 into IKEv2 Notify Payload
OUTPUT/east.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512: 00 04
OUTPUT/east.pluto.log:|    auth method: IKEv2_AUTH_NULL (0xd)
OUTPUT/east.pluto.log:"clear-or-private#192.1.2.254/32"[2] ...192.1.2.254 #3: authenticated using authby=null and peer ID_NULL 'ID_NULL'
OUTPUT/east.pluto.log:|    auth method: IKEv2_AUTH_DIGSIG (0xe)
OUTPUT/road.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256 into IKEv2 Notify Payload
OUTPUT/road.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256: 00 02
OUTPUT/road.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384 into IKEv2 Notify Payload
OUTPUT/road.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384: 00 03
OUTPUT/road.pluto.log:| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512 into IKEv2 Notify Payload
OUTPUT/road.pluto.log:| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512: 00 04
OUTPUT/road.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:| hash algorithm identifier (network ordered)
OUTPUT/road.pluto.log:|    auth method: IKEv2_AUTH_NULL (0xd)
OUTPUT/road.pluto.log:|    auth method: IKEv2_AUTH_DIGSIG (0xe)
OUTPUT/road.pluto.log:"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: authenticated using RSA with SHA2_512 and peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' issued by CA 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
road #

