The Demo Script
Run this from a clean directory with no prior state:
cd /tmp && rm -rf pki-demo && mkdir pki-demo && cd pki-demo
pki init
pki issue server localhost --alt 127.0.0.1
pki issue client device-001
pki issue client device-002
pki list
pki serve-ocsp &
OCSP_PID=$!
pki echo-server --port 4433 &
SERVER_PID=$!
pki echo-client --host localhost --port 4433 --identity device-001 --msg "hello"
pki echo-client --host localhost --port 4433 --identity device-002 --msg "hello"
pki revoke $(pki list | grep device-002 | awk '{print $1}') --reason keyCompromise
pki echo-client --host localhost --port 4433 --identity device-002 --msg "hello"
pki list
kill $OCSP_PID $SERVER_PID