1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-10-29 15:02:30 +00:00

tlsconst: Deprecate in favour of stdlib's tls

The tlsconst internal package was created to provide human-readable
names for TLS versions and ciphers, from the IANA registry.

These days, that functionality is provided by stdlib's tls package, so
the internal package is no longer needed, and this patch removes it.

The only observable change is that the descriptive version in the
Received header now says "TLS 1.3" instead of "TLS-1.3", but it's just
as standard-compliant since that is in a free-form text section.
This commit is contained in:
Alberto Bertogli
2026-10-04 18:35:40 +01:00
parent 9b3f7ca193
commit 5131fdacb4
10 changed files with 113 additions and 600 deletions
+2 -3
View File
@@ -31,7 +31,6 @@ import (
"blitiri.com.ar/go/chasquid/internal/normalize"
"blitiri.com.ar/go/chasquid/internal/queue"
"blitiri.com.ar/go/chasquid/internal/set"
"blitiri.com.ar/go/chasquid/internal/tlsconst"
"blitiri.com.ar/go/chasquid/internal/trace"
"blitiri.com.ar/go/spf"
)
@@ -773,12 +772,12 @@ func (c *Conn) addReceivedHeader() {
if c.tlsConnState != nil {
// https://tools.ietf.org/html/rfc8314#section-4.3
received += fmt.Sprintf("tls %s\n",
tlsconst.CipherSuiteName(c.tlsConnState.CipherSuite))
tls.CipherSuiteName(c.tlsConnState.CipherSuite))
}
received += fmt.Sprintf("(over %s, ", c.mode)
if c.tlsConnState != nil {
received += fmt.Sprintf("%s, ", tlsconst.VersionName(c.tlsConnState.Version))
received += fmt.Sprintf("%s, ", tls.VersionName(c.tlsConnState.Version))
} else {
received += "plain text!, "
}