| 1 | /testing/guestbin/swan-prepscip-shell filesystem . . `/testing/guestbin/swan-prep`. --nokeys |
| 2 | |
| 3 | # Generate a sane CA and a sane peer certificate. |
| 4 | |
| 5 | ipsec certutil -m 1 -S -k rsa -x -n new-ca -s "CN=new-ca" -v 12 -t "CT,C,C" -z ipsec.conf |
| 6 | ipsec certutil -m 2 -S -k rsa -c new-ca -n new-west -s "CN=new-west" -v 12 -t "u,u,u" -z ipsec.conf |
| 7 | ipsec pk12util -W secret -o OUTPUT/new-west.p12 -n new-west |
| 8 | ipsec certutil -L -n new-west -a > OUTPUT/new-west.crt |
| 9 | ipsec certutil -F -n new-west |
| 10 | |
| 11 | # Now generate a CA that expires this month. Use that to sign a |
| 12 | # certificate (for west) that has just started to be valid and |
| 13 | # slightly more recent than above. |
| 14 | |
| 15 | ipsec certutil -m 1 -S -k rsa -x -w -11 -v 12 -n old-ca -s "CN=old-ca" -v 12 -t "CT,C,C" -z ipsec.conf |
| 16 | ipsec certutil -m 2 -S -k rsa -c old-ca -n old-west -s "CN=old-west" -v 12 -t "u,u,u" -z ipsec.conf |
| 17 | ipsec pk12util -W secret -o OUTPUT/old-west.p12 -n old-west |
| 18 | ipsec certutil -L -n old-west -a > OUTPUT/old-west.crt |
| 19 | ipsec certutil -F -n old-west |
| 20 | |
| 21 | ipsec vfychain to confirm the above settings |
| 22 | # |
| 23 | # -p -p engages the new PKIX interface that pluto is using. |
| 24 | # |
| 25 | # -u 12 -> 1<<12 is #define certificateUsageIPsec (0x1000) |
| 26 | # |
| 27 | # -b YYMMDDHHMMZ (yea, CC is magic) |
| 28 | |
| 29 | ipsec vfychain -v -u 12 -p -p -a OUTPUT/new-west.crt |
| 30 | ipsec vfychain -v -u 12 -p -p -a OUTPUT/old-west.crt |