7 Usage: peer {gnutls|openssl} {server|client}
12 function gnutls_impl
() {
13 CA_ARGS
="--x509cafile ca.cert"
16 gnutls-serv
--http $CA_ARGS --x509keyfile server.key \
17 --x509certfile server.cert
-p "$PORT" -r
20 gnutls-cli
$CA_ARGS --x509keyfile client.key \
21 --x509certfile client.cert
-p "$PORT" localhost
28 function openssl_impl
() {
29 CA_ARGS
="-CAfile ca.cert"
33 openssl s_server
-www $CA_ARGS -key server.key \
34 -cert server.cert
-accept "$PORT" -Verify client.cert
37 openssl s_client
$CA_ARGS -key client.key \
38 -cert client.cert
-connect "localhost:${PORT}"