diff --git a/examples/https/README.md b/examples/https/README.md new file mode 100644 index 0000000..0e1b539 --- /dev/null +++ b/examples/https/README.md @@ -0,0 +1,32 @@ +After running `make examples`, if SSL is enabled, you can quickly test HTTPS, with optional client-based certificate authentication using the following process within the build directory: + +``` +# do all the stupid ssl generation +./examples/https/bin/generate.sh + +# Test without client auth + +# Run the server +./examples/example_https \ + -cert examples/https/server-crt.pem \ + -key examples/https/server-key.pem + +# Make a request +curl -vk https://localhost:4443/ + +# Test WITH client auth + +./examples/example_https \ + -cert examples/https/server-crt.pem \ + -key examples/https/server-key.pem \ + -ca examples/https/ca-crt.pem \ + -verify-peer \ + -verify-depth 2 \ + -enforce-peer-cert + +# Make a request with the client key +curl -kv \ + --key examples/https/client1-key.pem \ + --cert examples/https/client1-crt.pem \ + https://localhost:4443/ +```