package tls
import (
"internal/godebug"
"slices"
_ "unsafe"
)
var tlskyber = godebug .New ("tlskyber" )
func defaultCurvePreferences() []CurveID {
if tlskyber .Value () == "0" {
return []CurveID {X25519 , CurveP256 , CurveP384 , CurveP521 }
}
return []CurveID {x25519Kyber768Draft00 , X25519 , CurveP256 , CurveP384 , CurveP521 }
}
var defaultSupportedSignatureAlgorithms = []SignatureScheme {
PSSWithSHA256 ,
ECDSAWithP256AndSHA256 ,
Ed25519 ,
PSSWithSHA384 ,
PSSWithSHA512 ,
PKCS1WithSHA256 ,
PKCS1WithSHA384 ,
PKCS1WithSHA512 ,
ECDSAWithP384AndSHA384 ,
ECDSAWithP521AndSHA512 ,
PKCS1WithSHA1 ,
ECDSAWithSHA1 ,
}
var tlsrsakex = godebug .New ("tlsrsakex" )
var tls3des = godebug .New ("tls3des" )
func defaultCipherSuites() []uint16 {
suites := slices .Clone (cipherSuitesPreferenceOrder )
return slices .DeleteFunc (suites , func (c uint16 ) bool {
return disabledCipherSuites [c ] ||
tlsrsakex .Value () != "1" && rsaKexCiphers [c ] ||
tls3des .Value () != "1" && tdesCiphers [c ]
})
}
var defaultCipherSuitesTLS13 = []uint16 {
TLS_AES_128_GCM_SHA256 ,
TLS_AES_256_GCM_SHA384 ,
TLS_CHACHA20_POLY1305_SHA256 ,
}
var defaultCipherSuitesTLS13NoAES = []uint16 {
TLS_CHACHA20_POLY1305_SHA256 ,
TLS_AES_128_GCM_SHA256 ,
TLS_AES_256_GCM_SHA384 ,
}
var defaultSupportedVersionsFIPS = []uint16 {
VersionTLS12 ,
}
var defaultCurvePreferencesFIPS = []CurveID {CurveP256 , CurveP384 , CurveP521 }
var defaultSupportedSignatureAlgorithmsFIPS = []SignatureScheme {
PSSWithSHA256 ,
PSSWithSHA384 ,
PSSWithSHA512 ,
PKCS1WithSHA256 ,
ECDSAWithP256AndSHA256 ,
PKCS1WithSHA384 ,
ECDSAWithP384AndSHA384 ,
PKCS1WithSHA512 ,
ECDSAWithP521AndSHA512 ,
}
var defaultCipherSuitesFIPS = []uint16 {
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ,
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ,
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ,
TLS_RSA_WITH_AES_128_GCM_SHA256 ,
TLS_RSA_WITH_AES_256_GCM_SHA384 ,
}
var defaultCipherSuitesTLS13FIPS = []uint16 {
TLS_AES_128_GCM_SHA256 ,
TLS_AES_256_GCM_SHA384 ,
}
The pages are generated with Golds v0.7.0-preview . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .