~chrisppy/beagles

f2a4c4963f4a7d4d5741fddab2aba07a7d3d63c1 — Chris Palmer 6 months ago 205b22f
Update go-gemini to 1.19
3 files changed, 8 insertions(+), 9 deletions(-)

M go.mod
M go.sum
M util/util.go
M go.mod => go.mod +2 -2
@@ 5,7 5,7 @@ go 1.16
replace gitlab.com/tslocum/cview v1.5.3 => git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7

require (
	git.sr.ht/~adnano/go-gemini v0.1.18
	git.sr.ht/~adnano/go-gemini v0.1.19
	git.sr.ht/~chrisppy/go-barefeed v0.1.0
	git.sr.ht/~chrisppy/go-opml v1.0.0
	git.sr.ht/~emersion/go-scfg v0.0.0-20201019143924-142a8aa629fc


@@ 20,5 20,5 @@ require (
	gitlab.com/tslocum/cbind v0.1.4
	gitlab.com/tslocum/cview v1.5.3
	go.etcd.io/bbolt v1.3.5
	golang.org/x/sys v0.0.0-20210304203840-7b4935edff86 // indirect
	golang.org/x/sys v0.0.0-20210305034016-7844c3c200c3 // indirect
)

M go.sum => go.sum +4 -4
@@ 1,5 1,5 @@
git.sr.ht/~adnano/go-gemini v0.1.18 h1:VGHrM4m1s7MNmXCI9Ui4RDWKWI2x/DMlF44M5F4soHQ=
git.sr.ht/~adnano/go-gemini v0.1.18/go.mod h1:kmWT0aLnjkuzAMouxNT6Bqv756HYHSe56HE7yoF5P7Y=
git.sr.ht/~adnano/go-gemini v0.1.19 h1:afHsauRIFb12diB32KLpepvT5UKJDk80dQf2mp9/tnI=
git.sr.ht/~adnano/go-gemini v0.1.19/go.mod h1:kmWT0aLnjkuzAMouxNT6Bqv756HYHSe56HE7yoF5P7Y=
git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7 h1:OKIPsl2z9OsQDm8jnQfbwJDl0GakXJLhtBnTkbT6PW0=
git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7/go.mod h1:lCEqP/zDhBihNbyiEn59LgOCk09ejefHaS7kNZ57Nmc=
git.sr.ht/~chrisppy/go-barefeed v0.1.0 h1:kyf1sJx4uGLesiXagd4sCP9C8+TPge+y/VxFTX6dI4E=


@@ 90,8 90,8 @@ golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201211090839-8ad439b19e0f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210304203840-7b4935edff86 h1:TmVfeQsidiBAiZMvxnHWD63KxYBVCiFs+k/pWtzhllI=
golang.org/x/sys v0.0.0-20210304203840-7b4935edff86/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305034016-7844c3c200c3 h1:RdE7htvBru4I4VZQofQjCZk5W9+aLNlSF5n0zgVwm8s=
golang.org/x/sys v0.0.0-20210305034016-7844c3c200c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

M util/util.go => util/util.go +2 -3
@@ 32,7 32,6 @@ import (
	"regexp"
	"runtime"
	"strings"
	"time"

	"git.sr.ht/~adnano/go-gemini"
	"git.sr.ht/~adnano/go-gemini/tofu"


@@ 109,10 108,10 @@ func ParseFeed(path string, gmniPath string) (f *gofeed.Feed, err error) {

		client := &gemini.Client{}
		client.TrustCertificate = func(hostname string, cert *x509.Certificate) error {
			host := tofu.NewHost(hostname, cert.Raw, cert.NotAfter)
			host := tofu.NewHost(hostname, cert.Raw)

			knownHost, ok := hosts.Lookup(hostname)
			if ok && time.Now().Before(knownHost.Expires) {
			if ok {
				// Check fingerprint
				if bytes.Equal(knownHost.Fingerprint, host.Fingerprint) {
					return nil