Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
offer only TLS 1.3 cipher suites for TLS 1.3 ClientHellos
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Mar 30, 2023
1 parent 8fcfb95 commit a42b12e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handshake_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ func (c *Conn) makeClientHello() (*clientHelloMsg, *ecdh.PrivateKey, error) {

var key *ecdh.PrivateKey
if hello.supportedVersions[0] == VersionTLS13 {
if len(hello.supportedVersions) == 1 {
hello.cipherSuites = hello.cipherSuites[:0]
}
if hasAESGCMHardwareSupport {
hello.cipherSuites = append(hello.cipherSuites, defaultCipherSuitesTLS13...)
} else {
Expand Down

0 comments on commit a42b12e

Please sign in to comment.