/testing/guestbin/swan-prep
west #
 echo "initdone"
initdone
west #
 sed -i "s/seedbits=.*$/seedbits=520/" /etc/ipsec.conf
west #
 ipsec start
Redirecting to: [initsystem]
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 egrep "bits random|bytes from|seeded" /tmp/pluto.log
| need 520 bits random for extra seeding of the NSS PRNG
| read 65 bytes from /dev/random for NSS PRNG
seeded 65 bytes into the NSS PRNG
west #
 sed -i "s/seedbits=.*$/seedbits=1024/" /etc/ipsec.conf
west #
 ipsec start
Redirecting to: [initsystem]
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 egrep "bits random|bytes from|seeded" /tmp/pluto.log
| need 1024 bits random for extra seeding of the NSS PRNG
| read 128 bytes from /dev/random for NSS PRNG
seeded 128 bytes into the NSS PRNG
west #
 sed -i "s/seedbits=.*$/seedbits=2048/" /etc/ipsec.conf
west #
 ipsec start
Redirecting to: [initsystem]
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 sleep 10
west #
 # this ping should fail due to the type=block connection
west #
 ping -c 1 192.1.2.23
ping: connect: Operation not permitted
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 egrep "bits random|bytes from|seeded" /tmp/pluto.log
| need 2048 bits random for extra seeding of the NSS PRNG
| read 256 bytes from /dev/random for NSS PRNG
seeded 256 bytes into the NSS PRNG
west #
 test -f PATH/libexec/ipsec/pluto && PLUTOBIN="PATH/libexec/ipsec/pluto"
west #
 test -f PATH/libexec/ipsec/pluto && PLUTOBIN="PATH/libexec/ipsec/pluto"
west #
 /testing/guestbin/checksec.sh --file $PLUTOBIN
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   PATH/libexec/ipsec/pluto
west #
 
