mirror of
https://github.com/actix/examples
synced 2024-11-24 06:43:00 +01:00
8186a8cfea
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru> Co-authored-by: Altug Sahin <altugsahin@gmail.com> Co-authored-by: Rob Ede <robjtede@icloud.com> |
||
---|---|---|
.. | ||
certs | ||
src | ||
Cargo.toml | ||
README.md |
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