/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 # added different CA
west #
 /testing/x509/import.sh real/otherca/otherwest.all.p12
ipsec pk12util -w nss-pw -i real/otherca/otherwest.all.p12
pk12util: PKCS12 IMPORT SUCCESSFUL
ipsec certutil -M -n otherca -t CT,,
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, 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: 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: 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 #
 ../../guestbin/ipsec-kernel-state.sh
west #
 ../../guestbin/ipsec-kernel-policy.sh
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 #
 
