Challenge Assignment
Build a Rust CLI binary: tls-info <hostname> [port]
tls-info google.com
tls-info api.amazon.com 443
Required output:
- Negotiated TLS version
- Cipher suite
- Certificate chain: for each cert print subject, issuer, SANs, validity dates
- Whether the handshake succeeded
Crates to use:
tokio = { version = "1", features = ["full"] }
rustls = "0.23"
tokio-rustls = "0.26"
webpki-roots = "0.26"
x509-parser = "0.16"
rustls-pki-types = "1"