Fixes a few logical issues and order of op
This commit is contained in:
parent
bef32b7ff5
commit
6c52299c7a
|
@ -833,12 +833,12 @@ func (c *client) Visit(url string) {
|
|||
}
|
||||
case "gemini":
|
||||
capsule, err := gemini.Visit(u.Host, u.Port, u.Resource, &c.Certs)
|
||||
go saveConfig()
|
||||
if err != nil {
|
||||
c.SetMessage(err.Error(), true)
|
||||
c.DrawMessage()
|
||||
return
|
||||
}
|
||||
go saveConfig()
|
||||
switch capsule.Status {
|
||||
case 1:
|
||||
c.search("", u.Full, capsule.Content)
|
||||
|
|
|
@ -113,7 +113,7 @@ func Retrieve(host, port, resource string, td *TofuDigest) (string, error) {
|
|||
// the hostname on the certificate(s) from the server
|
||||
// is the hostname we have requested
|
||||
connState := conn.ConnectionState()
|
||||
if len(connState.PeerCertificates) < 0 {
|
||||
if len(connState.PeerCertificates) < 1 {
|
||||
return "", fmt.Errorf("Insecure, no certificates offered by server")
|
||||
}
|
||||
hostCertExists := td.Exists(host)
|
||||
|
|
Loading…
Reference in New Issue