From 94caca08d89c805179117878c8f2100c14fc5251 Mon Sep 17 00:00:00 2001 From: xenolf Date: Thu, 12 Nov 2015 22:49:02 +0100 Subject: [PATCH] correctly fix go1.5 dependency --- acme/http_challenge.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/acme/http_challenge.go b/acme/http_challenge.go index e0bdfac6..f0a2d3cc 100644 --- a/acme/http_challenge.go +++ b/acme/http_challenge.go @@ -33,7 +33,11 @@ func (s *httpChallenge) Solve(chlng challenge, domain string) error { return err } - keyThumb := base64.URLEncoding.WithPadding(base64.NoPadding).EncodeToString(thumbBytes) + keyThumb := base64.URLEncoding.EncodeToString(thumbBytes) + index := strings.Index(keyThumb, "=") + if index != -1 { + keyThumb = keyThumb[:index] + } keyAuth := chlng.Token + "." + keyThumb go s.startHTTPServer(domain, chlng.Token, keyAuth)