/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 whack --impair revival west # ipsec auto --add old-west "old-west": added IKEv2 connection west # ipsec auto --add new-west "new-west": added IKEv2 connection west # # out with the old west # ipsec auto --up new-west "new-west" #1: initiating IKEv2 connection to 192.1.2.23 using UDP "new-west" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500 "new-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 "new-west" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500 "new-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' "new-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 --delete new-west "new-west": terminating SAs using this connection "new-west" #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification "new-west" #2: ESP traffic information: in=0B out=0B west # # in with the new west # ipsec auto --up old-west "old-west" #3: initiating IKEv2 connection to 192.1.2.23 using UDP "old-west" #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500 "old-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 "old-west" #3: sent IKE_AUTH request to 192.1.2.23:UDP/500 "old-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' "old-west" #4: initiator established Child SA using #3; 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 #