mirror of
https://github.com/square/certigo.git
synced 2024-04-21 12:32:40 +00:00
Rename dumpAuthTLSFromXXX methods
This commit is contained in:
+1
-1
@@ -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
@@ -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
|
||||
|
||||
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user