tls: enable the selection of more TLS settings (#1695)

tls: enable the selection of more TLS settings
* Rename `tls_config` to `tls_server_config`.
* Add new http server config with HTTP/2 enabled by default.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2020-05-13 20:26:01 +02:00 committed by GitHub
commit f87e566df9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 433 additions and 40 deletions

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_ca_file : "somefile"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "RequireAndVerifyClientCert"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
basic_auth_users:

View file

@ -1,2 +1,2 @@
tls_config :
tls_server_config :
cert_filse: "testdata/server.crt"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_ca_file : "testdata/tls-ca-chain.pem"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "RequireAndVerifyClientCert"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"

View file

@ -0,0 +1,26 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- TLS_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
- TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
- TLS_RSA_WITH_3DES_EDE_CBC_SHA
- TLS_RSA_WITH_AES_128_CBC_SHA
- TLS_RSA_WITH_AES_256_CBC_SHA
- TLS_RSA_WITH_AES_128_GCM_SHA256
- TLS_RSA_WITH_AES_256_GCM_SHA384

View file

@ -0,0 +1,10 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
curve_preferences:
- CurveP256
- CurveP384
- CurveP521
- X25519

View file

@ -1,3 +1,3 @@
tls_config :
tls_server_config :
cert_file : ""
key_file : "testdata/server.key"

View file

@ -1,3 +1,3 @@
tls_config :
tls_server_config :
cert_file : "somefile"
key_file : "testdata/server.key"

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : ""
key_file : ""
client_auth_type: "x"

View file

@ -1,3 +1,3 @@
tls_config :
tls_server_config :
cert_file : "somefile"
key_file : "somefile"

View file

@ -0,0 +1,8 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA2048

View file

@ -0,0 +1,7 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
curve_preferences:
- CurveP257

View file

@ -1,3 +1,3 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : ""

View file

@ -1,3 +1,3 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.cert"
key_file : "somefile"

View file

@ -0,0 +1,10 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_RSA_WITH_AES_128_CBC_SHA
max_version: TLS12
http_server_config:
http2: false

View file

@ -0,0 +1,8 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_RSA_WITH_AES_128_CBC_SHA
max_version: TLS12

View file

@ -0,0 +1,10 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
min_version: TLS12
max_version: TLS12

View file

@ -0,0 +1,11 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
cipher_suites:
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
prefer_server_cipher_suites: false
min_version: TLS12
max_version: TLS12

View file

@ -0,0 +1,8 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
min_version: TLS13
curve_preferences:
- CurveP521

View file

@ -0,0 +1,6 @@
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
client_auth_type : "VerifyClientCertIfGiven"
client_ca_file : "testdata/tls-ca-chain.pem"
min_version: TLS111

View file

@ -1,4 +1,4 @@
tls_config :
tls_server_config :
cert_file : "testdata/server.crt"
key_file : "testdata/server.key"
basic_auth_users: