/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 # Import the root CA, and use that to generate a cert+pubkey that's
west #
 # valid in 1 month (-w 1) and expires in 12 months (-v 12).
west #
 /testing/x509/import.sh real/mainca/root.p12
 ipsec pk12util -w nss-pw -i real/mainca/root.p12
pk12util: PKCS12 IMPORT SUCCESSFUL
 ipsec certutil -M -n mainca -t CT,,
 ipsec certutil -O -n mainca
"mainca" [E=testing@libreswan.org,CN=Libreswan test CA for mainca,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA]
west #
 ipsec certutil -m 2 -S -k rsa -c mainca -n `hostname`-notyetvalid -s CN=`hostname`-notyetvalid -w 1 -v 12 -t CT,, -z east.conf
Generating key.  This may take a few moments...
west #
 ipsec certutil -L
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
mainca                                                       CTu,u,u
west-notyetvalid                                             CTu,u,u
west #
 # verify the result
west #
 ipsec certutil -L -a -n `hostname`-notyetvalid -o OUTPUT/`hostname`-notyetvalid.crt
west #
 ! ipsec vfychain -v -u 12 -p -p -p -a OUTPUT/`hostname`-notyetvalid.crt
Chain is bad!
PROBLEM WITH THE CERT CHAIN:
CERT 0. west-notyetvalid :
  ERROR -8181: Peer's Certificate has expired.
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 # beware the groundhog
west #
 ipsec add nss-cert
"nss-cert": WARNING: left is a groundhog
"nss-cert": WARNING: groundhog left certificate 'west-notyetvalid' is not yet valid
"nss-cert": added IKEv1 connection
west #
 echo "initdone"
initdone
west #
 ipsec whack --impair revival
west #
 ipsec whack --impair suppress_retransmits
west #
 ipsec auto --up nss-cert
"nss-cert" #1: initiating IKEv1 Main Mode connection
"nss-cert" #1: sent Main Mode request
"nss-cert" #1: sent Main Mode I2
"nss-cert" #1: I am sending my cert
"nss-cert" #1: I am sending a certificate request
"nss-cert" #1: sent Main Mode I3
"nss-cert" #1: ignoring secured informational payload INVALID_ID_INFORMATION, msgid=MSGID, length=12
"nss-cert" #1: STATE_MAIN_I3: 60 second timeout exceeded after 0 retransmits.  Possible authentication failure: no acceptable response to our first encrypted message
"nss-cert" #1: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"nss-cert" #1: IMPAIR: revival: skip scheduling revival event
"nss-cert" #1: deleting ISAKMP SA (MAIN_I3) and NOT sending notification
west #
 echo done
done
west #
 # will only show up on east - note "expired" is wrong and should be "not yet valid"
west #
 grep '^[^|].*ERROR' /tmp/pluto.log
west #
