Rename dumpAuthTLSFromXXX methods

This commit is contained in:
Cedric Staub
2019-05-21 11:20:24 -07:00
parent 75258cfd3c
commit 25850151d7
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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
@@ -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)}