/testing/guestbin/swan-prep --x509
Preparing X.509 files
west #
 # why manually start?
west #
 mkdir -p /var/run/pluto
west #
 ipsec pluto --config /etc/ipsec.conf
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add nss-cert
"nss-cert": added IKEv1 connection
west #
 echo "initdone"
initdone
west #
 ipsec auto --up nss-cert
"nss-cert" #1: initiating IKEv1 Main Mode connection
"nss-cert" #1: sent Main Mode request
"nss-cert" #1: sent Main Mode I2
"nss-cert" #1: sent Main Mode I3
"nss-cert" #1: Peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
"nss-cert" #1: authenticated peer using preloaded certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 3nnn-bit RSA with SHA1 signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"nss-cert" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"nss-cert" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"nss-cert" #2: sent Quick Mode request
"nss-cert" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
west #
 ipsec auto --down nss-cert
"nss-cert": initiating delete of connection's IPsec SA #2 and ISAKMP SA #1
"nss-cert" #2: deleting IPsec SA (QUICK_I2) and sending notification using ISAKMP SA #1
"nss-cert" #2: ESP traffic information: in=0B out=0B
"nss-cert" #1: deleting ISAKMP SA (MAIN_I4) and sending notification
west #
 # pluto should still be running
west #
 pidof pluto > /dev/null || echo not running?
west #
 # whack socket will hang because pluto is expected to die
west #
 ipsec whack --seccomp-crashtest & disown ; sleep 2
[x] PID
pluto is running with seccomp=enabled! pluto is expected to die!
Performing seccomp security test using getsid() syscall
west #
 # pluto should not be running anymore
west #
 pidof pluto
west #
 # one entry of SECCOMP activating should show up in the log
west #
 ausearch -r -m seccomp -ts boot | sed "s/ip=.*/ip=XXX/"
type=SECCOMP msg=audit(XXX): auid=AUID uid=0 gid=0 ses=SES subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=PID comm="pluto" exe="PATH/libexec/ipsec/pluto" sig=31 arch=c000003e syscall=124 compat=0 ip=XXX
west #
 # don't leave post-mortem.sh thinking pluto is running
west #
 rm /run/pluto/pluto.ctl
west #
 
