1
0
mirror of https://github.com/actix/examples synced 2024-11-27 07:52:57 +01:00
examples/https-tls/rustls-client-cert
2023-02-25 12:38:19 +00:00
..
certs restructure folders 2022-02-18 02:01:48 +00:00
src https-tls: typo - correct URIs to use https (#606) 2023-02-25 12:38:19 +00:00
Cargo.toml move a couple more things to workspace deps 2023-01-02 20:33:43 +00:00
README.md format markdown 2022-03-06 00:43:10 +00:00

Access Client Certificate (via Rustls)

Usage

Certificate

All the self-signed certificate are in the ./certs directory, including the CA certificate generated by mkcert that was used to create the server and client certs.

Server

cd security/rustls-client-cert
cargo run

The server runs HTTP on port 8080 and HTTPS on port 8443.

Providing Client Cert

Using HTTPie:

http https://127.0.0.1:8443/ --verify=certs/rootCA.pem --cert=certs/client-cert.pem --cert-key=certs/client-key.pem

Using cURL:

curl https://127.0.0.1:8443/ --cacert certs/rootCA.pem --cert certs/client-cert.pem --key certs/client-key.pem