Skip to content

Commit

Permalink
Merge pull request #523 from ignoramous/patch-7
Browse files Browse the repository at this point in the history
doh: use tls session cache
  • Loading branch information
fortuna authored Nov 5, 2024
2 parents 27637e0 + 47668c3 commit 5a48272
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Android/app/src/go/doh/doh.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ func NewResolver(rawurl string, addrs []string, dialer *net.Dialer, auth ClientA
return nil, fmt.Errorf("No IP addresses for %s", t.hostname)
}

// Supply a client certificate during TLS handshakes.
var tlsconfig *tls.Config
// Use session cache to minimize repeat TLS handshake overhead.
tlsconfig := &tls.Config{
ClientSessionCache: tls.NewLRUClientSessionCache(64),
}
if auth != nil {
signer := newClientAuthWrapper(auth)
tlsconfig = &tls.Config{
GetClientCertificate: signer.GetClientCertificate,
}
tlsconfig.GetClientCertificate = signer.GetClientCertificate
}

// Override the dial function.
Expand Down

0 comments on commit 5a48272

Please sign in to comment.