Full article: Mutual TLS intro and hands-on example
curl
can use --insecure
to ignore the server certificate:
curl --insecure https://localhost:8888/hello-world.txt
TLS Hello World!
Connect to the TLS server:
curl https://localhost:8888/hello-world.txt --cacert ./certs/server-ca.crt
TLS Hello World!
Connect to the mTLS server:
curl https://localhost:8889/hello-world.txt --cacert ./certs/server-ca.crt --cert ./certs/client.crt --key ./certs/client.key
mTLS Hello World!