/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 # Generate west's CA and then use that to generate a signed
west #
 # cert+private-key that east can present when authenticating.  All
west #
 # dates for these certs are sane.
west #
 ipsec certutil -m 1 -S -k rsa -x         -n west-ca -s "CN=west-ca"  -v 12 -t "CT,C,C" -z ipsec.conf
Generating key.  This may take a few moments...
west #
 ipsec certutil -m 2 -S -k rsa -c west-ca -n east    -s "CN=east" -v 12 -t "u,u,u"  -z ipsec.conf
Generating key.  This may take a few moments...
Notice: Trust flag u is set automatically if the private key is present.
west #
 ipsec pk12util -W secret -o OUTPUT/east.p12 -n east
pk12util: PKCS12 EXPORT SUCCESSFUL
west #
 ipsec certutil -L -n east -a > OUTPUT/east.crt
west #
 ipsec certutil -F -n east
west #
 # Import the old and new certificates
west #
 ipsec pk12util -i OUTPUT/new-west.p12 -W secret
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 ipsec pk12util -i OUTPUT/old-west.p12 -W secret
pk12util: PKCS12 IMPORT SUCCESSFUL
west #
 # now get going
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add old-west
"old-west": added IKEv2 connection
west #
 ipsec auto --add new-west
"new-west": added IKEv2 connection
west #
 ipsec auto --up old-west
"old-west" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"old-west" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"old-west" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"old-west" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"old-west" #1: initiator established IKE SA; authenticated peer certificate 'CN=east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=west-ca'
"old-west" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec auto --down old-west
"old-west": initiating delete of connection's IKE SA #1 (and Child SA #2)
"old-west" #1: sent INFORMATIONAL request to delete IKE SA
"old-west" #2: ESP traffic information: in=0B out=0B
"old-west" #1: deleting IKE SA (established IKE SA)
west #
 ipsec auto --up new-west
"new-west" #3: initiating IKEv2 connection to 192.1.2.23 using UDP
"new-west" #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"new-west" #3: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"new-west" #3: sent IKE_AUTH request to 192.1.2.23:UDP/500
"new-west" #3: initiator established IKE SA; authenticated peer certificate 'CN=east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=west-ca'
"new-west" #4: initiator established Child SA using #3; IPsec tunnel [192.0.2.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec auto --down new-west
"new-west": initiating delete of connection's IKE SA #3 (and Child SA #4)
"new-west" #3: sent INFORMATIONAL request to delete IKE SA
"new-west" #4: ESP traffic information: in=0B out=0B
"new-west" #3: deleting IKE SA (established IKE SA)
west #
 ipsec auto --up old-west
"old-west" #5: initiating IKEv2 connection to 192.1.2.23 using UDP
"old-west" #5: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"old-west" #5: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"old-west" #5: sent IKE_AUTH request to 192.1.2.23:UDP/500
"old-west" #5: initiator established IKE SA; authenticated peer certificate 'CN=east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=west-ca'
"old-west" #6: initiator established Child SA using #5; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec auto --down old-west
"old-west": initiating delete of connection's IKE SA #5 (and Child SA #6)
"old-west" #5: sent INFORMATIONAL request to delete IKE SA
"old-west" #6: ESP traffic information: in=0B out=0B
"old-west" #5: deleting IKE SA (established IKE SA)
west #
 ipsec auto --up new-west
"new-west" #7: initiating IKEv2 connection to 192.1.2.23 using UDP
"new-west" #7: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"new-west" #7: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"new-west" #7: sent IKE_AUTH request to 192.1.2.23:UDP/500
"new-west" #7: initiator established IKE SA; authenticated peer certificate 'CN=east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'CN=west-ca'
"new-west" #8: initiator established Child SA using #7; IPsec tunnel [192.0.2.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec auto --down new-west
"new-west": initiating delete of connection's IKE SA #7 (and Child SA #8)
"new-west" #7: sent INFORMATIONAL request to delete IKE SA
"new-west" #8: ESP traffic information: in=0B out=0B
"new-west" #7: deleting IKE SA (established IKE SA)
west #
 
