RFC 2818 - HTTP Over TLS (HTTPS) - Riferimento rapido
Riferimento rapido
HTTPS vs HTTP
| Caratteristica | HTTP | HTTPS |
|---|---|---|
| Protocollo | http:// | https:// |
| Porta | 80 | 443 |
| Crittografia | ❌ Testo in chiaro | ✅ Crittografato TLS |
| Integrità | ❌ Nessuna protezione | ✅ Protezione MAC |
| Autenticazione | ❌ Nessuna auth server | ✅ Auth certificato |
| Privacy | ❌ Può essere intercettato | ✅ Trasmissione crittografata |
Panoramica dell'handshake TLS
Client Server
| |
|--- ClientHello --------------->|
| |
|<-- ServerHello, Certificate ---|
|<-- ServerHelloDone ------------|
| |
|--- ClientKeyExchange --------->|
|--- ChangeCipherSpec ---------->|
|--- Finished ------------------>|
| |
|<-- ChangeCipherSpec -----------|
|<-- Finished -------------------|
| |
|=== Canale crittografato ======|
| |
|--- Richiesta HTTP crittografata->|
|<-- Risposta HTTP crittografata-|
Strumenti comuni
# OpenSSL visualizzare certificato
openssl s_client -connect www.example.com:443 -showcerts
# Testare versione TLS
openssl s_client -connect www.example.com:443 -tls1_2
# Visualizzare dettagli certificato
echo | openssl s_client -connect www.example.com:443 2>/dev/null | \
openssl x509 -noout -text
# cURL utilizzare HTTPS
curl -v https://www.example.com