

STILL SEEMS BROKEN

west:~#
 TESTNAME=ikev2-x509-02
west:~#
 source /testing/pluto/bin/westlocal.sh
west:~#
 rm -f /tmp/$TESTNAME/ipsec.d/certs/west*
west:~#
 rm -f /tmp/$TESTNAME/ipsec.d/crls/nic.crl
west:~#
 ping -n -c 4 192.0.2.254
PING 192.0.2.254 (192.0.2.254): 56 data bytes
64 bytes from 192.0.2.254: icmp_seq=0 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=1 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=2 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=3 ttl=257 time=999 ms

--- 192.0.2.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
west:~#
 ping -n -c 4 192.0.2.254
PING 192.0.2.254 (192.0.2.254): 56 data bytes

--- 192.0.2.254 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
west:~#
 ipsec setup start
ipsec_setup: Starting Libreswan IPsec VERSION
west:~#
 ipsec whack --whackrecord /var/tmp/ikev2.record
west:~#
 ipsec auto --add ikev2-westnet-eastnet-x509-cr
037 can not load certificate file west.crt 
west:~#
 ipsec auto --status
000 using kernel interface: klips
000 interface ipsec0/eth1 192.1.2.45
000 %myid = (none)
000 debug raw+crypt+parsing+emitting+control+lifecycle+klips+dns+oppo+controlmore+pfkey+nattraversal+x509+private
000  
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=64, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=128, keysizemin=128, keysizemax=256
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000  
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC, blocksize=8, keydeflen=128
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, keydeflen=192
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65004, name=OAKLEY_SERPENT_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65289, name=OAKLEY_TWOFISH_CBC_SSH, blocksize=16, keydeflen=128
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
000 algorithm IKE hash: id=2, name=OAKLEY_SHA1, hashsize=20
000 algorithm IKE hash: id=4, name=OAKLEY_SHA2_256, hashsize=32
000 algorithm IKE hash: id=6, name=OAKLEY_SHA2_512, hashsize=64
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024, bits=1024
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536, bits=1536
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048, bits=2048
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072, bits=3072
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096, bits=4096
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144, bits=6144
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192, bits=8192
000  
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,0,0} trans={0,0,0} attrs={0,0,0} 
000  
000 "ikev2-westnet-eastnet-x509-cr": 192.1.2.45<192.1.2.45>[S=C]...192.1.2.23<192.1.2.23>[S=C]; unrouted; eroute owner: #0
000 "ikev2-westnet-eastnet-x509-cr":     myip=unset; hisip=unset; mycert=west.crt;
000 "ikev2-westnet-eastnet-x509-cr":   ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 3
000 "ikev2-westnet-eastnet-x509-cr":   policy: RSASIG+ENCRYPT+TUNNEL+PFS+IKEv2ALLOW+IKEv2Init; prio: 32,32; interface: eth1; 
000 "ikev2-westnet-eastnet-x509-cr":   newest ISAKMP SA: #0; newest IPsec SA: #0; 
000  
000  
west:~#
 S=5
west:~#
 echo "sleep ${S} sec"
sleep 5 sec
west:~#
 sleep 5
west:~#
 echo "done"
done
west:~#
 ipsec auto --up ikev2-westnet-eastnet-x509-cr
133 "ikev2-westnet-eastnet-x509-cr" #1: STATE_PARENT_I1: initiate
133 "ikev2-westnet-eastnet-x509-cr" #1: STATE_PARENT_I1: sent v2I1, expected v2R1
134 "ikev2-westnet-eastnet-x509-cr" #2: STATE_PARENT_I2: sent v2I2, expected v2R2 {auth=IKEv2 cipher=aes_128 integ=sha1 prf=oakley_sha group=modp2048}

