tech:notes_openssl
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_openssl [2025/11/09 19:44] – Jean-Baptiste | tech:notes_openssl [2026/06/29 14:20] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes OpenSSL | ||
| + | |||
| + | Voir aussi les implémentations : | ||
| + | * [[# | ||
| + | * [[# | ||
| + | * miTLS | ||
| + | |||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | Voir aussi : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | |||
| + | ## Général | ||
| + | |||
| + | Get the location of your openssl files | ||
| + | ~~~bash | ||
| + | openssl version -d | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ## Sécurité - Cipher suite | ||
| + | |||
| + | Il est recommandé de désactiver ces suites de chiffrement afin d' | ||
| + | |||
| + | Il est recommandé de n' | ||
| + | (et ECB) | ||
| + | |||
| + | La conformité standard de protection des données de secteur de carte de paiement (norme PCI DSS) exige des chiffrements CBC d' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## Tester TLS / SSL | ||
| + | |||
| + | |||
| + | Liens : | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## LibreSSL | ||
| + | |||
| + | Vous pouvez compiler [LibreSSL](https:// | ||
| + | Ça compile très bien sous Debian. L' | ||
| + | |||
| + | A voir également pour les curieux la lib [gnurl](https:// | ||
| + | Une réécriture de curl avec GnuTLS à la place d' | ||
| + | |||
| + | |||
| + | |||
| + | ## Autre | ||
| + | |||
| + | Quelles versions de SSL/TLS sont prises en charge par ma version d' | ||
| + | ~~~bash | ||
| + | openssl s_client -help 2>& | ||
| + | ~~~ | ||
| + | |||
| + | Pour chiffrement de fichier voir **scrypt** | ||
| + | |||
| + | Voir SSL/TLS - Benjamin Sonntag Il était une fois Internet | ||
| + | https:// | ||
| + | |||
| + | SSL Config Generator | ||
| + | Generateur de conf pour Gninx, Apache, HAProxy... | ||
| + | https:// | ||
| + | |||
| + | Pour se s’amplifier la vie, alias bash à OpenSSL | ||
| + | https:// | ||
| + | |||
| + | gnutls-cli-debug gnunet.org | ||
| + | sslscan --no-failed gnunet.org | ||
| + | |||
| + | Voir aussi **sslscan** | ||
| + | |||
| + | http:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | ~~~bash | ||
| + | openssl s_client -connect host:443 -servername www.test.fr -cert cert_and_key.pem -key cert_and_key.pem -state -debug | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | openssl enc -bf -in fichier.txt -out fichier.txt.enc -pass file: | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | openssl enc -d -bf -in fichier.txt.enc -out fichier.txt -pass file: | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | nmap --script ssl-enum-ciphers www.test.fr | ||
| + | ~~~ | ||
| + | |||
| + | Emprunte / Hash d'un certificat | ||
| + | ~~~ | ||
| + | $ openssl s_client -connect gnunet.org: | ||
| + | depth=3 C = DE, O = Deutsche Telekom AG, OU = T-TeleSec Trust Center, CN = Deutsche Telekom Root CA 2 | ||
| + | verify error: | ||
| + | verify return:0 | ||
| + | DONE | ||
| + | SHA1 Fingerprint=9E: | ||
| + | ~~~ | ||
| + | |||
| + | ou | ||
| + | |||
| + | ~~~bash | ||
| + | gnutls-cli --print-cert acme.fr </ | ||
| + | ~~~ | ||
| + | |||
| + | Vérifier la chaîne de certification | ||
| + | ~~~bash | ||
| + | gnutls-cli --print-cert acme.fr </ | ||
| + | ~~~ | ||
| + | |||
| + | Connaître la date d' | ||
| + | ~~~ | ||
| + | $ openssl s_client -connect gnunet.org: | ||
| + | notAfter=Feb 12 00:00:00 2019 GM | ||
| + | ~~~ | ||
| + | |||
| + | ssl-cert-check s' | ||
| + | Voir | ||
| + | * http:// | ||
| + | * http:// | ||
| + | * http:// | ||
| + | ~~~ | ||
| + | $ ./ | ||
| + | |||
| + | Host Status | ||
| + | ----------------------------------------------- ------------ ------------ ---- | ||
| + | gnunet.org: | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### http2 | ||
| + | |||
| + | Voir aussi : | ||
| + | * nghttp2-client | ||
| + | * h2load | ||
| + | |||
| + | ~~~ | ||
| + | $ echo -n | openssl s_client -connect www.acme.fr: | ||
| + | CONNECTED(00000003) | ||
| + | Protocols advertised by server: h2, http/1.1 | ||
| + | ... | ||
| + | Next protocol: (2) NULL | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | nmap --script=tls-nextprotoneg -p 443 www.acme.fr | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | openssl s_client -connect www.acme.fr: | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## GnuTLS | ||
| + | |||
| + | ~~~ | ||
| + | $ gnutls-cli-debug gnunet.org | ||
| + | Checking for SSL 3.0 support... no | ||
| + | Checking whether %COMPAT is required... no | ||
| + | Checking for TLS 1.0 support... yes | ||
| + | Checking for TLS 1.1 support... yes | ||
| + | Checking fallback from TLS 1.1 to... N/A | ||
| + | Checking for TLS 1.2 support... yes | ||
| + | Checking whether we need to disable TLS 1.2... N/A | ||
| + | Checking whether we need to disable TLS 1.1... N/A | ||
| + | Checking whether we need to disable TLS 1.0... N/A | ||
| + | Checking for Safe renegotiation support... no | ||
| + | Checking for Safe renegotiation support (SCSV)... no | ||
| + | Checking for HTTPS server name... not checked | ||
| + | Checking for version rollback bug in RSA PMS... dunno | ||
| + | Checking for version rollback bug in Client Hello... no | ||
| + | Checking whether the server ignores the RSA PMS version... yes | ||
| + | Checking whether the server can accept Hello Extensions... yes | ||
| + | Checking whether the server can accept HeartBeat Extension... no | ||
| + | Checking whether the server can accept small records (512 bytes)... yes | ||
| + | Checking whether the server can accept cipher suites not in SSL 3.0 spec... yes | ||
| + | Checking whether the server can accept a bogus TLS record version in the client hello... yes | ||
| + | Checking for certificate information... N/A | ||
| + | Checking for trusted CAs... N/A | ||
| + | Checking whether the server understands TLS closure alerts... yes | ||
| + | Checking whether the server supports session resumption... yes | ||
| + | Checking for anonymous authentication support... no | ||
| + | Checking anonymous Diffie-Hellman group info... N/A | ||
| + | Checking for ephemeral Diffie-Hellman support... yes | ||
| + | Checking ephemeral Diffie-Hellman group info... N/A | ||
| + | Checking for ephemeral EC Diffie-Hellman support... yes | ||
| + | Checking ephemeral EC Diffie-Hellman group info... | ||
| + | Curve SECP256R1 | ||
| + | Checking for AES-128-GCM cipher support... yes | ||
| + | Checking for AES-128-CBC cipher support... yes | ||
| + | Checking for CAMELLIA-128-GCM cipher support... no | ||
| + | Checking for CAMELLIA-128-CBC cipher support... yes | ||
| + | Checking for 3DES-CBC cipher support... yes | ||
| + | Checking for ARCFOUR 128 cipher support... no | ||
| + | Checking for MD5 MAC support... no | ||
| + | Checking for SHA1 MAC support... yes | ||
| + | Checking for SHA256 MAC support... yes | ||
| + | Checking for ZLIB compression support... no | ||
| + | Checking for max record size... no | ||
| + | Checking for OpenPGP authentication support... no | ||
| + | ~~~ | ||
| + | |||
| + | SMTP (StartTLS) | ||
| + | ~~~bash | ||
| + | openssl s_client -tls1 -starttls smtp -crlf -connect smtp.acme.fr: | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Liste des courbes elliptiques disponibles | ||
| + | ~~~bash | ||
| + | openssl ecparam -list_curves | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Perf | ||
| + | |||
| + | ~~~bash | ||
| + | openssl speed | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | gnutls-cli --benchmark-ciphers | ||
| + | ~~~ | ||
| + | |||
