Skip to content

Commit a33c09a

Browse files
authored
Deps update (#289)
* Dependency version bumps and according fixes & touchups * Change to async to avoid interactive dialogs * Move the Let's Encrypt environment selection to proper place
1 parent 68bb6ab commit a33c09a

File tree

5 files changed

+390
-148
lines changed

5 files changed

+390
-148
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.13-alpine AS builder
1+
FROM golang:alpine AS builder
22
LABEL maintainer="[email protected]"
33

44
RUN apk add --update gcc musl-dev git

challengeprovider.go

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package main
22

3-
import "github.com/go-acme/lego/challenge/dns01"
3+
import (
4+
"context"
5+
"github.com/mholt/acmez/acme"
6+
)
47

58
// ChallengeProvider implements go-acme/lego Provider interface which is used for ACME DNS challenge handling
69
type ChallengeProvider struct {
@@ -13,18 +16,22 @@ func NewChallengeProvider(servers []*DNSServer) ChallengeProvider {
1316
}
1417

1518
// Present is used for making the ACME DNS challenge token available for DNS
16-
func (c *ChallengeProvider) Present(_, _, keyAuth string) error {
17-
_, token := dns01.GetRecord("whatever", keyAuth)
19+
func (c *ChallengeProvider) Present(ctx context.Context, challenge acme.Challenge) error {
1820
for _, s := range c.servers {
19-
s.PersonalKeyAuth = token
21+
s.PersonalKeyAuth = challenge.DNS01KeyAuthorization()
2022
}
2123
return nil
2224
}
2325

2426
// CleanUp is called after the run to remove the ACME DNS challenge tokens from DNS records
25-
func (c *ChallengeProvider) CleanUp(_, _, _ string) error {
27+
func (c *ChallengeProvider) CleanUp(ctx context.Context, _ acme.Challenge) error {
2628
for _, s := range c.servers {
2729
s.PersonalKeyAuth = ""
2830
}
2931
return nil
3032
}
33+
34+
// Wait is a dummy function as we are just going to be ready to answer the challenge from the get-go
35+
func (c *ChallengeProvider) Wait(_ context.Context, _ acme.Challenge) error {
36+
return nil
37+
}

go.mod

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
module github.com/joohoi/acme-dns
22

3-
go 1.13
3+
go 1.16
44

55
require (
6-
github.com/BurntSushi/toml v0.3.1
7-
github.com/DATA-DOG/go-sqlmock v1.3.3
6+
github.com/BurntSushi/toml v0.4.1
7+
github.com/DATA-DOG/go-sqlmock v1.5.0
88
github.com/ajg/form v1.5.1 // indirect
9-
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
9+
github.com/caddyserver/certmagic v0.15.2
1010
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5
1111
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 // indirect
1212
github.com/gavv/httpexpect v2.0.0+incompatible
13-
github.com/go-acme/lego v2.7.2+incompatible
14-
github.com/go-acme/lego/v3 v3.1.0
15-
github.com/google/uuid v1.1.1
16-
github.com/gorilla/websocket v1.4.1 // indirect
13+
github.com/go-acme/lego/v3 v3.9.0
14+
github.com/google/uuid v1.3.0
15+
github.com/gorilla/websocket v1.4.2 // indirect
1716
github.com/imkira/go-interpol v1.1.0 // indirect
1817
github.com/julienschmidt/httprouter v1.3.0
19-
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
20-
github.com/lib/pq v1.2.0
21-
github.com/mattn/go-colorable v0.1.4 // indirect
22-
github.com/mattn/go-sqlite3 v1.11.0
23-
github.com/mholt/certmagic v0.8.1-0.20191019173955-6f9f0e6dd0e8
24-
github.com/miekg/dns v1.1.22
18+
github.com/lib/pq v1.10.4
19+
github.com/mattn/go-colorable v0.1.12 // indirect
20+
github.com/mattn/go-sqlite3 v1.14.10
21+
github.com/mholt/acmez v1.0.1
22+
github.com/miekg/dns v1.1.45
2523
github.com/moul/http2curl v1.0.0 // indirect
26-
github.com/rs/cors v1.7.0
27-
github.com/sergi/go-diff v1.0.0 // indirect
28-
github.com/sirupsen/logrus v1.4.2
29-
github.com/valyala/fasthttp v1.5.0 // indirect
30-
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
24+
github.com/rs/cors v1.8.2
25+
github.com/sergi/go-diff v1.2.0 // indirect
26+
github.com/sirupsen/logrus v1.8.1
27+
github.com/valyala/fasthttp v1.31.0 // indirect
3128
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
3229
github.com/yudai/gojsondiff v1.0.0 // indirect
3330
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
3431
github.com/yudai/pp v2.0.1+incompatible // indirect
35-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
36-
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 // indirect
37-
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
32+
go.uber.org/atomic v1.9.0 // indirect
33+
go.uber.org/multierr v1.7.0 // indirect
34+
go.uber.org/zap v1.20.0 // indirect
35+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
36+
golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d // indirect
37+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
38+
golang.org/x/tools v0.1.8 // indirect
3839
)

0 commit comments

Comments
 (0)