Skip to content

Commit

Permalink
attack: make DefaultTLSConfig.InsecureSkipVerify false
Browse files Browse the repository at this point in the history
No reason for it to be true, since the correspondent -insecure flag is
false by default.

Signed-off-by: Tomás Senart <tsenart@gmail.com>
  • Loading branch information
tsenart committed Jul 16, 2023
1 parent b2c13f8 commit 9fba769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var (
// DefaultLocalAddr is the default local IP address an Attacker uses.
DefaultLocalAddr = net.IPAddr{IP: net.IPv4zero}
// DefaultTLSConfig is the default tls.Config an Attacker uses.
DefaultTLSConfig = &tls.Config{InsecureSkipVerify: true}
DefaultTLSConfig = &tls.Config{InsecureSkipVerify: false}
)

// NewAttacker returns a new Attacker with default options which are overridden
Expand Down
2 changes: 1 addition & 1 deletion lib/attack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestAttackDuration(t *testing.T) {
func TestTLSConfig(t *testing.T) {
atk := NewAttacker()
got := atk.client.Transport.(*http.Transport).TLSClientConfig
if want := (&tls.Config{InsecureSkipVerify: true}); !reflect.DeepEqual(got, want) {
if want := (&tls.Config{InsecureSkipVerify: false}); !reflect.DeepEqual(got, want) {
t.Fatalf("got: %+v, want: %+v", got, want)
}
}
Expand Down

0 comments on commit 9fba769

Please sign in to comment.