Skip to content

Commit 76ce9f0

Browse files
ccojocargcmurphy
authored andcommitted
Update to config struct to unmarshal the mozilla server-side TLS conf version 5
Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent e050355 commit 76ce9f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/tlsconfig/tlsconfig.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type ServerSideTLSJson struct {
3636
// see https://wiki.mozilla.org/Security/Server_Side_TLS
3737
type Configuration struct {
3838
OpenSSLCiphersuites []string `json:"openssl_ciphersuites"`
39-
Ciphersuites []string `json:"ciphersuites"`
39+
OpenSSLCiphers []string `json:"openssl_ciphers"`
4040
TLSVersions []string `json:"tls_versions"`
4141
TLSCurves []string `json:"tls_curves"`
4242
CertificateTypes []string `json:"certificate_types"`
@@ -87,7 +87,10 @@ func getGoCipherConfig(name string, sstls ServerSideTLSJson) (goCipherConfigurat
8787
return cipherConf, fmt.Errorf("TLS configuration '%s' not found", name)
8888
}
8989

90-
for _, cipherName := range conf.Ciphersuites {
90+
// These ciphers are already defined in IANA format
91+
cipherConf.Ciphers = append(cipherConf.Ciphers, conf.OpenSSLCiphersuites...)
92+
93+
for _, cipherName := range conf.OpenSSLCiphers {
9194
cipherSuite, ok := constants.CipherSuites[cipherName]
9295
if !ok {
9396
log.Printf("'%s' cipher is not available in crypto/tls package\n", cipherName)

0 commit comments

Comments
 (0)