Standard library / crypto/tls
tls.CipherSuite
Description of a cipher suite including ID, Name, SupportedVersions and Insecure. Not a configuration or negotiated session. Expected stdout: 'TLS_AES_128_GCM_SHA256 false\n'.
Formal Syntax & Structure
go syntaxgo
type CipherSuite struct { ID uint16 Name string
SupportedVersions []uint16
Insecure bool}Working Example
Example Snippetgo
package main
import ( "crypto/tls" "fmt")
func main() { for _, s := range tls.CipherSuites() { if s.ID == tls.TLS_AES_128_GCM_SHA256 { fmt.Println(s.Name, s.Insecure) } }}
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}