/testing/guestbin/swan-prep --x509
Preparing X.509 files
west #
 certutil -d sql:/etc/ipsec.d -D -n east
west #
 ipsec start
Redirecting to: systemctl start ipsec.service
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 ipsec auto --add nss-cert
002 added connection description "nss-cert"
west #
 echo "initdone"
initdone
west #
 ipsec whack --debug-all --impair-retransmits
west #
 # This is expected to fail because remote cert is not yet valid.
west #
 # It should return whack but it does not?
west #
 ipsec auto --up nss-cert
002 "nss-cert" #1: initiating Main Mode
104 "nss-cert" #1: STATE_MAIN_I1: initiate
106 "nss-cert" #1: STATE_MAIN_I2: sent MI2, expecting MR2
002 "nss-cert" #1: I am sending my cert
002 "nss-cert" #1: I am sending a certificate request
108 "nss-cert" #1: STATE_MAIN_I3: sent MI3, expecting MR3
002 "nss-cert" #1: Main mode peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=notyetvalid.testing.libreswan.org, E=testing@libreswan.org'
003 "nss-cert" #1: Certificate E=testing@libreswan.org,CN=notyetvalid.testing.libreswan.org,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA failed verification
003 "nss-cert" #1: ERROR: Peer's Certificate has expired.
003 "nss-cert" #1: no RSA public key known for 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=notyetvalid.testing.libreswan.org, E=testing@libreswan.org'
217 "nss-cert" #1: STATE_MAIN_I3: INVALID_KEY_INFORMATION
002 "nss-cert" #1: sending encrypted notification INVALID_KEY_INFORMATION to 192.1.2.23:500
002 "nss-cert" #1: suppressing retransmit because IMPAIR_RETRANSMITS is set
031 "nss-cert" #1: max number of retransmissions (0) reached STATE_MAIN_I3.  Possible authentication failure: no acceptable response to our first encrypted message
002 "nss-cert" #1: deleting state (STATE_MAIN_I3)
west #
 echo done
done
west #
 # only expected to show failure on west
west #
 grep "ERROR" /tmp/pluto.log
"nss-cert" #1: ERROR: Peer's Certificate has expired.
west #
west #
 if [ -n "`ls /tmp/core* 2>/dev/null`" ]; then echo CORE FOUND; mv /tmp/core* OUTPUT/; fi
west #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi

