Skip to content

Commit

Permalink
Merge branch 'fix/issue-2398' of github.com:getlantern/lantern into f…
Browse files Browse the repository at this point in the history
…ix/issue-2398
  • Loading branch information
xiam committed May 7, 2015
2 parents 7882dc4 + 7cd3263 commit 2ffc8a8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/github.com/getlantern/fronted/masquerade.go
@@ -1,11 +1,11 @@
package fronted

import (
"crypto/x509"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -145,11 +145,8 @@ func (vms *verifiedMasqueradeSet) doVerify(masquerade *Masquerade) bool {
resp, err := httpClient.Do(req)
if err != nil {
errmsg := fmt.Sprintf("HTTP error for masquerade %v: %v", masquerade.Domain, err)

if strings.Contains(err.Error(), "unknown authority") {
// We can't compare err to x509.UnknownAuthorityError directly, but we
// can try to see if it contains a known string. This is a temporary
// fix, see https://github.com/getlantern/lantern/issues/2398
if _, ok := err.(x509.UnknownAuthorityError); ok {
// This is a temporary fix, see https://github.com/getlantern/lantern/issues/2398
errmsg = fmt.Sprintf("%s, tlsInfo: %s", errmsg, vms.dialer.tlsInfo(masquerade))
}

Expand Down

0 comments on commit 2ffc8a8

Please sign in to comment.