Skip to content

Commit

Permalink
attestedtls: added Readtimeout in Dialer
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremias Giesecke <[email protected]>
  • Loading branch information
Jeremias Giesecke authored and smo4201 committed Dec 19, 2023
1 parent 72ebd27 commit 0a8be58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attestedtls/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"crypto/tls"
"fmt"
"net"
"time"
)

// Wraps tls.Dial
Expand All @@ -29,6 +30,7 @@ func Dial(network string, addr string, config *tls.Config, moreConfigs ...Connec
// Create TLS connection
var dialer net.Dialer
dialer.Timeout = timeout
dialer.Deadline = (time.Now().Add(timeout))
conn, err := tls.DialWithDialer(&dialer, network, addr, config)
if err != nil {
details := fmt.Sprintf("%v certificate chain(s) provided: ", len(config.Certificates))
Expand Down

0 comments on commit 0a8be58

Please sign in to comment.