1 #!/bin/sh 2 3 . hitch_test.sh 4 5 cp ${CERTSDIR}/default.example.com cert.pem 6 7 # XXX: reload doesn't work with a relative pem file 8 cat >hitch.cfg <<EOF 9 pem-file = "$PWD/cert.pem" 10 frontend = "[localhost]:$LISTENPORT" 11 backend = "[hitch-tls.org]:80" 12 EOF 13 14 # XXX: reload doesn't work with a relative config file 15 start_hitch --config=$PWD/hitch.cfg 16 17 s_client >s_client1.dump 18 subject_field_eq CN "default.example.com" s_client1.dump 19 20 # restart hitch after having a more recent cert file 21 cp ${CERTSDIR}/ecc.example.com.pem cert.pem 22 echo "kill -HUP $(hitch_pid)" 23 kill -HUP $(hitch_pid) 24 sleep 2 25 26 s_client | tee s_client2.dump 27 subject_field_eq CN "ecc.example.com" s_client2.dump