Skip to content

Commit e050355

Browse files
ccojocargcmurphy
authored andcommitted
Update the TLS config generator to handle TLS version 1.3
Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent c0510fc commit e050355

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/tlsconfig/tlsconfig.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type ServerSideTLSJson struct {
3535
// Configuration represents configurations levels declared by the Mozilla server-side-tls
3636
// see https://wiki.mozilla.org/Security/Server_Side_TLS
3737
type Configuration struct {
38-
OpenSSLCiphersuites string `json:"openssl_ciphersuites"`
38+
OpenSSLCiphersuites []string `json:"openssl_ciphersuites"`
3939
Ciphersuites []string `json:"ciphersuites"`
4040
TLSVersions []string `json:"tls_versions"`
4141
TLSCurves []string `json:"tls_curves"`
@@ -47,6 +47,9 @@ type Configuration struct {
4747
ECDHParamSize float64 `json:"ecdh_param_size"`
4848
HstsMinAge float64 `json:"hsts_min_age"`
4949
OldestClients []string `json:"oldest_clients"`
50+
OCSPStample bool `json:"ocsp_staple"`
51+
ServerPreferedOrder bool `json:"server_preferred_order"`
52+
MaxCertLifespan float64 `json:"maximum_certificate_lifespan"`
5053
}
5154

5255
type goCipherConfiguration struct {
@@ -108,6 +111,8 @@ func mapTLSVersions(tlsVersions []string) []int {
108111
var versions []int
109112
for _, tlsVersion := range tlsVersions {
110113
switch tlsVersion {
114+
case "TLSv1.3":
115+
versions = append(versions, tls.VersionTLS13)
111116
case "TLSv1.2":
112117
versions = append(versions, tls.VersionTLS12)
113118
case "TLSv1.1":

0 commit comments

Comments
 (0)