This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e0c241
commit 6ecf7e7
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ | ||
``` |