diff options
author | Laurent Demailly <[email protected]> | 2024-07-20 11:19:03 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-20 20:19:03 +0200 |
commit | 319683b86307d9e3686f28c7c248c3b2bb918f93 (patch) | |
tree | 2209d6ff177c080d41ae5745b1f0a7833010005c | |
parent | 4af3f618f83e1b881fa72ee480a01ce3e76d7506 (diff) | |
download | tinygo-319683b86307d9e3686f28c7c248c3b2bb918f93.tar.gz tinygo-319683b86307d9e3686f28c7c248c3b2bb918f93.zip |
Add enough tls.ConnectionState and tls.CipherSuiteName() to compile fortio/log (#4345)
src/crypt: add enough tls.ConnectionState and tls.CipherSuiteName() to compile fortio/log
-rw-r--r-- | src/crypto/tls/common.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/crypto/tls/common.go b/src/crypto/tls/common.go index 5b9c0c5f5..caf0198e1 100644 --- a/src/crypto/tls/common.go +++ b/src/crypto/tls/common.go @@ -10,6 +10,7 @@ import ( "context" "crypto" "crypto/x509" + "fmt" "io" "net" "sync" @@ -23,9 +24,21 @@ import ( // only supports Elliptic Curve based groups. See RFC 8446, Section 4.2.7. type CurveID uint16 +// CipherSuiteName returns the standard name for the passed cipher suite ID +// +// Not Implemented. +func CipherSuiteName(id uint16) string { + return fmt.Sprintf("0x%04X", id) +} + // ConnectionState records basic TLS details about the connection. type ConnectionState struct { // TINYGO: empty; TLS connection offloaded to device + // + // Minimum (empty) fields for fortio.org/log http logging and others + // to compile and run. + PeerCertificates []*x509.Certificate + CipherSuite uint16 } // ClientAuthType declares the policy the server will follow for |