Rename a few things to prepare for DoH support
This commit is contained in:
parent
375378c15b
commit
29f1b083a0
|
@ -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")
|
||||||
}
|
}
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue