$ go version
go version go1.8.3 darwin/amd64
I would like to set tls.Config.CipherSuites to a non-default value (such as mozilla's "modern" compatibility recommendation), and prioritize either AES-GCM or ChaCha20 depending on whether hardware-accelerated AES is available (i.e. the same logic as in tls/common.go).
There is no way that I can see to inspect this default certificate list (it is only used in the non-exported Config.cipherSuites method), and the cipherhw package is internal-only. I could duplicate the cipherhw package and make the CPUID assembly call myself (and the analogous instructions for other CPUs), but that allows for version skew between my code and crypto/tls: what I want is not "does this CPU have AES support", but "will crypto/tls use an accelerated AES implementation on this CPU".
It would be nice if crypto/tls exposed either some way to inspect its default cipher suite list or to make the same performance-based cipher prioritization decisions as the default implementation.
I would like to set
tls.Config.CipherSuitesto a non-default value (such as mozilla's "modern" compatibility recommendation), and prioritize either AES-GCM or ChaCha20 depending on whether hardware-accelerated AES is available (i.e. the same logic as in tls/common.go).There is no way that I can see to inspect this default certificate list (it is only used in the non-exported
Config.cipherSuitesmethod), and thecipherhwpackage is internal-only. I could duplicate thecipherhwpackage and make theCPUIDassembly call myself (and the analogous instructions for other CPUs), but that allows for version skew between my code andcrypto/tls: what I want is not "does this CPU have AES support", but "willcrypto/tlsuse an accelerated AES implementation on this CPU".It would be nice if
crypto/tlsexposed either some way to inspect its default cipher suite list or to make the same performance-based cipher prioritization decisions as the default implementation.