/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 # added different CA
west #
 /testing/x509/import.sh otherca/otherwest.p12
 ipsec pk12util -w nss-pw -i otherca/otherwest.p12
pk12util: PKCS12 IMPORT SUCCESSFUL
 ipsec certutil -M -n otherca -t CT,,
 ipsec certutil -O -n otherwest
"otherca" [E=testing@libreswan.org,CN=Libreswan test CA for otherca,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA]
  "otherwest" [E=user-otherwest@testing.libreswan.org,CN=otherwest.other.libreswan.org,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA]
west #
 # check
west #
 ipsec certutil -L
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
otherwest                                                    u,u,u
otherca                                                      CT,, 
west #
 cp policies/* /etc/ipsec.d/policies/
west #
 echo "192.1.2.0/24" >> /etc/ipsec.d/policies/private-or-clear
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 # give OE policies time to load
west #
 ../../guestbin/wait-for.sh --match 'loaded 10,' -- ipsec auto --status
Total IPsec connections: loaded 10, routed 5, active 0
west #
 echo "initdone"
initdone
west #
 ipsec whack --impair suppress_retransmits
west #
 # this should fail AUTH on mismatched CA
west #
 ipsec whack --oppohere 192.1.2.45 --oppothere 192.1.2.23
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23: initiate on-demand for packet 192.1.2.45:8-ICMP->192.1.2.23:0 by whack
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #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
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: sent IKE_AUTH request to 192.1.2.23:UDP/500 with digital-signature and DER_ASN1_DN 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=otherwest.other.libreswan.org, E=user-otherwest@testing.libreswan.org'; Child SA #2 {ESP <0xESPESP}
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: IKE SA authentication request rejected by peer: AUTHENTICATION_FAILED
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: encountered fatal error in state IKE_AUTH_I
"private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: deleting IKE SA (sent IKE_AUTH request)
west #
 echo done
done
west #
 ipsec _kernel state
west #
 ipsec _kernel policy
src 192.1.2.45/32 dst 192.1.2.23/32
	dir out priority 0 ptype main
src 127.0.0.1/32 dst 192.1.2.45/32
	dir fwd priority PRIORITY ptype main
src 127.0.0.1/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
src 192.1.2.45/32 dst 127.0.0.1/32
	dir out priority PRIORITY ptype main
src 192.1.2.45/32 dst 192.1.2.253/32
	dir out priority PRIORITY ptype main
src 192.1.2.45/32 dst 192.1.2.254/32
	dir out priority PRIORITY ptype main
src 192.1.2.45/32 dst 192.1.3.253/32
	dir out priority PRIORITY ptype main
src 192.1.2.253/32 dst 192.1.2.45/32
	dir fwd priority PRIORITY ptype main
src 192.1.2.253/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
src 192.1.2.254/32 dst 192.1.2.45/32
	dir fwd priority PRIORITY ptype main
src 192.1.2.254/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
src 192.1.3.253/32 dst 192.1.2.45/32
	dir fwd priority PRIORITY ptype main
src 192.1.3.253/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
src 192.1.2.45/32 dst 192.1.2.0/24
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid 0 mode transport
west #
