File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,8 @@ import (
23
23
type Client struct {
24
24
// keep a reference to the connection so it can be used to create a TLS
25
25
// connection later
26
- conn net.Conn
27
- text * textproto.Conn
28
- // whether the Client is using TLS
29
- tls bool
26
+ conn net.Conn
27
+ text * textproto.Conn
30
28
serverName string
31
29
lmtp bool
32
30
// map of supported extensions
@@ -138,9 +136,6 @@ func (c *Client) setConn(conn net.Conn) {
138
136
Closer : conn ,
139
137
}
140
138
c .text = textproto .NewConn (rwc )
141
-
142
- _ , isTLS := conn .(* tls.Conn )
143
- c .tls = isTLS
144
139
}
145
140
146
141
// Close closes the connection.
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ func TestClientAuthTrimSpace(t *testing.T) {
34
34
& wrote ,
35
35
}
36
36
c := NewClient (fake )
37
- c .tls = true
38
37
c .didHello = true
39
38
c .Auth (toServerEmptyAuth {})
40
39
c .Close ()
@@ -110,8 +109,6 @@ func TestBasic(t *testing.T) {
110
109
t .Fatalf ("Second VRFY: expected verification, got %s" , err )
111
110
}
112
111
113
- // fake TLS so authentication won't complain
114
- c .tls = true
115
112
c .serverName = "smtp.google.com"
116
113
if err := c .Auth (sasl .NewPlainClient ("" , "user" , "pass" )); err != nil {
117
114
t .Fatalf ("AUTH failed: %s" , err )
@@ -428,7 +425,6 @@ func TestHello(t *testing.T) {
428
425
case 2 :
429
426
err = c .Verify ("test@example.com" )
430
427
case 3 :
431
- c .tls = true
432
428
c .serverName = "smtp.google.com"
433
429
err = c .Auth (sasl .NewPlainClient ("" , "user" , "pass" ))
434
430
case 4 :
@@ -538,7 +534,6 @@ func TestAuthFailed(t *testing.T) {
538
534
c := NewClient (fake )
539
535
defer c .Close ()
540
536
541
- c .tls = true
542
537
c .serverName = "smtp.google.com"
543
538
err := c .Auth (sasl .NewPlainClient ("" , "user" , "pass" ))
544
539
You can’t perform that action at this time.
0 commit comments