Rename a few things to prepare for DoH support

This commit is contained in:
Frank Denis 2018-01-26 01:51:05 +01:00
parent 375378c15b
commit 29f1b083a0
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ type CertInfo struct {
ForwardSecurity bool ForwardSecurity bool
} }
func FetchCurrentCert(proxy *Proxy, serverName *string, proto string, pk ed25519.PublicKey, serverAddress string, providerName string) (CertInfo, int, error) { func FetchCurrentDNSCryptCert(proxy *Proxy, serverName *string, proto string, pk ed25519.PublicKey, serverAddress string, providerName string) (CertInfo, int, error) {
if len(pk) != ed25519.PublicKeySize { if len(pk) != ed25519.PublicKeySize {
return CertInfo{}, 0, errors.New("Invalid public key length") return CertInfo{}, 0, errors.New("Invalid public key length")
} }

View File

@ -150,7 +150,7 @@ func (serversInfo *ServersInfo) fetchServerInfo(proxy *Proxy, name string, stamp
dlog.Warnf("Public key [%s] shouldn't be hex-encoded any more", string(stamp.serverPk)) dlog.Warnf("Public key [%s] shouldn't be hex-encoded any more", string(stamp.serverPk))
stamp.serverPk = serverPk stamp.serverPk = serverPk
} }
certInfo, rtt, err := FetchCurrentCert(proxy, &name, proxy.mainProto, stamp.serverPk, stamp.serverAddrStr, stamp.providerName) certInfo, rtt, err := FetchCurrentDNSCryptCert(proxy, &name, proxy.mainProto, stamp.serverPk, stamp.serverAddrStr, stamp.providerName)
if err != nil { if err != nil {
return ServerInfo{}, err return ServerInfo{}, err
} }