| 1 |
/testing/guestbin/swan-prep --nokeys |
| 2 |
Creating empty NSS database |
| 3 |
west # |
| 4 |
# import real west+key (no CA) |
| 5 |
west # |
| 6 |
/testing/x509/import.sh real/mainca/west.end.p12 |
| 7 |
ipsec pk12util -w nss-pw -i real/mainca/west.end.p12 |
| 8 |
pk12util: PKCS12 IMPORT SUCCESSFUL |
| 9 |
west # |
| 10 |
# import the fake EC ca (could also use real EC CA?) |
| 11 |
west # |
| 12 |
/testing/x509/import.sh fake/mainec/root.cert |
| 13 |
ipsec certutil -A -n mainec -t CT,, -i fake/mainec/root.cert |
| 14 |
west # |
| 15 |
# confirm |
| 16 |
west # |
| 17 |
ipsec certutil -L |
| 18 |
Certificate Nickname Trust Attributes |
| 19 |
SSL,S/MIME,JAR/XPI |
| 20 |
west u,u,u |
| 21 |
mainec CT,, |
| 22 |
west # |
| 23 |
# confirm that the network is alive |
| 24 |
west # |
| 25 |
../../guestbin/wait-until-alive -I 192.0.1.254 192.0.2.254 |
| 26 |
destination -I 192.0.1.254 192.0.2.254 is alive |
| 27 |
west # |
| 28 |
# ensure that clear text does not get through |
| 29 |
west # |
| 30 |
iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP |
| 31 |
west # |
| 32 |
iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT |
| 33 |
west # |
| 34 |
# confirm clear text does not get through |
| 35 |
west # |
| 36 |
../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254 |
| 37 |
down |
| 38 |
west # |
| 39 |
ipsec start |
| 40 |
Redirecting to: [initsystem] |
| 41 |
west # |
| 42 |
../../guestbin/wait-until-pluto-started |
| 43 |
west # |
| 44 |
ipsec auto --add ikev2-westnet-eastnet-x509-cr |
| 45 |
"ikev2-westnet-eastnet-x509-cr": added IKEv2 connection |
| 46 |
west # |
| 47 |
ipsec whack --impair suppress_retransmits |
| 48 |
west # |
| 49 |
ipsec whack --impair revival |
| 50 |
west # |
| 51 |
echo "initdone" |
| 52 |
initdone |
| 53 |
west # |
| 54 |
ipsec auto --up ikev2-westnet-eastnet-x509-cr |
| 55 |
"ikev2-westnet-eastnet-x509-cr" #1: initiating IKEv2 connection to 192.1.2.23 using UDP |
| 56 |
"ikev2-westnet-eastnet-x509-cr" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500 |
| 57 |
"ikev2-westnet-eastnet-x509-cr" #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 |
| 58 |
"ikev2-westnet-eastnet-x509-cr" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500 |
| 59 |
"ikev2-westnet-eastnet-x509-cr" #1: NSS: ERROR: IPsec certificate [email protected],CN=east.testing.libreswan.org,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA invalid: SEC_ERROR_UNKNOWN_ISSUER: Peer's Certificate issuer is not recognized. |
| 60 |
"ikev2-westnet-eastnet-x509-cr" #1: X509: certificate payload rejected for this connection |
| 61 |
"ikev2-westnet-eastnet-x509-cr" #1: encountered fatal error in state IKE_AUTH_I |
| 62 |
"ikev2-westnet-eastnet-x509-cr" #2: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds |
| 63 |
"ikev2-westnet-eastnet-x509-cr" #2: IMPAIR: revival: skip scheduling revival event |
| 64 |
"ikev2-westnet-eastnet-x509-cr" #1: deleting IKE SA (sent IKE_AUTH request) |
| 65 |
west # |
| 66 |
echo "done" |
| 67 |
done |
| 68 |
west # |
| 69 |
../../guestbin/ipsec-kernel-state.sh |
| 70 |
west # |
| 71 |
../../guestbin/ipsec-kernel-policy.sh |
| 72 |
west # |
| 73 |
|