Skip to content

Commit

Permalink
Rename dumpAuthTLSFromXXX methods
Browse files Browse the repository at this point in the history
  • Loading branch information
csstaub committed May 21, 2019
1 parent 75258cf commit 2585015
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion starttls/ftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
)

func dumpAuthTLSFromFTP(dialer Dialer, address string, config *tls.Config) (*tls.ConnectionState, error) {
func dumpTLSConnStateFromFTP(dialer Dialer, address string, config *tls.Config) (*tls.ConnectionState, error) {
c, err := dialer.Dial("tcp", address)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion starttls/imap.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net"
)

func dumpAuthTLSFromIMAP(dialer Dialer, address string, config *tls.Config) (*tls.ConnectionState, error) {
func dumpTLSConnStateFromIMAP(dialer Dialer, address string, config *tls.Config) (*tls.ConnectionState, error) {
c, err := dialer.Dial("tcp", address)
if err != nil {
return nil, err
Expand Down
8 changes: 4 additions & 4 deletions starttls/starttls.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

"github.com/square/certigo/starttls/ldap"
"github.com/square/certigo/starttls/mysql"
"github.com/square/certigo/starttls/psql"
pq "github.com/square/certigo/starttls/psql"

"github.com/mwitkow/go-http-dialer"
http_dialer "github.com/mwitkow/go-http-dialer"
)

// Protocols are the names of supported protocols
Expand Down Expand Up @@ -232,11 +232,11 @@ func GetConnectionState(startTLSType, connectName, connectTo, identity, clientCe
res <- connectResult{&state, nil}
case "ftp":
addr := withDefaultPort(connectTo, 21)
state, err = dumpAuthTLSFromFTP(dialer, addr, tlsConfig)
state, err = dumpTLSConnStateFromFTP(dialer, addr, tlsConfig)
res <- connectResult{state, err}
case "imap":
addr := withDefaultPort(connectTo, 143)
state, err = dumpAuthTLSFromIMAP(dialer, addr, tlsConfig)
state, err = dumpTLSConnStateFromIMAP(dialer, addr, tlsConfig)
res <- connectResult{state, err}
default:
res <- connectResult{nil, fmt.Errorf("unknown StartTLS protocol: %s", startTLSType)}
Expand Down

0 comments on commit 2585015

Please sign in to comment.