Skip to content

Commit 9fba769

Browse files
committed
attack: make DefaultTLSConfig.InsecureSkipVerify false
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>
1 parent b2c13f8 commit 9fba769

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/attack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var (
6060
// DefaultLocalAddr is the default local IP address an Attacker uses.
6161
DefaultLocalAddr = net.IPAddr{IP: net.IPv4zero}
6262
// DefaultTLSConfig is the default tls.Config an Attacker uses.
63-
DefaultTLSConfig = &tls.Config{InsecureSkipVerify: true}
63+
DefaultTLSConfig = &tls.Config{InsecureSkipVerify: false}
6464
)
6565

6666
// NewAttacker returns a new Attacker with default options which are overridden

lib/attack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestAttackDuration(t *testing.T) {
6565
func TestTLSConfig(t *testing.T) {
6666
atk := NewAttacker()
6767
got := atk.client.Transport.(*http.Transport).TLSClientConfig
68-
if want := (&tls.Config{InsecureSkipVerify: true}); !reflect.DeepEqual(got, want) {
68+
if want := (&tls.Config{InsecureSkipVerify: false}); !reflect.DeepEqual(got, want) {
6969
t.Fatalf("got: %+v, want: %+v", got, want)
7070
}
7171
}

0 commit comments

Comments
 (0)