go.mod: Update direct dependencies

This commit is contained in:
Matthew Holt 2021-06-03 12:18:25 -06:00
parent b4cef492cc
commit ecd5eeab38
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
5 changed files with 357 additions and 331 deletions

38
go.mod
View file

@ -3,33 +3,33 @@ module github.com/caddyserver/caddy/v2
go 1.15 go 1.15
require ( require (
github.com/Masterminds/sprig/v3 v3.1.0 github.com/Masterminds/sprig/v3 v3.2.2
github.com/alecthomas/chroma v0.8.2 github.com/alecthomas/chroma v0.9.1
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
github.com/caddyserver/certmagic v0.13.1 github.com/caddyserver/certmagic v0.13.1
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac
github.com/go-chi/chi v4.1.2+incompatible github.com/go-chi/chi v4.1.2+incompatible
github.com/google/cel-go v0.6.0 github.com/google/cel-go v0.7.3
github.com/google/uuid v1.2.0 github.com/google/uuid v1.2.0
github.com/klauspost/compress v1.11.3 github.com/klauspost/compress v1.13.0
github.com/klauspost/cpuid/v2 v2.0.6 github.com/klauspost/cpuid/v2 v2.0.6
github.com/lucas-clemente/quic-go v0.20.1 github.com/lucas-clemente/quic-go v0.21.0
github.com/mholt/acmez v0.1.3 github.com/mholt/acmez v0.1.3
github.com/naoina/go-stringutil v0.1.0 // indirect github.com/naoina/go-stringutil v0.1.0 // indirect
github.com/naoina/toml v0.1.1 github.com/naoina/toml v0.1.1
github.com/prometheus/client_golang v1.9.0 github.com/prometheus/client_golang v1.10.1-0.20210603120351-253906201bda
github.com/smallstep/certificates v0.15.4 github.com/smallstep/certificates v0.15.15
github.com/smallstep/cli v0.15.2 github.com/smallstep/cli v0.15.16
github.com/smallstep/nosql v0.3.0 // cannot upgrade from v0.3.0 until protobuf warning is fixed github.com/smallstep/nosql v0.3.6
github.com/smallstep/truststore v0.9.6 github.com/smallstep/truststore v0.9.6
github.com/yuin/goldmark v1.2.1 github.com/yuin/goldmark v1.3.7
github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691 github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01
go.uber.org/zap v1.16.0 go.uber.org/zap v1.17.0
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b golang.org/x/net v0.0.0-20210525063256-abc453219eb5
golang.org/x/term v0.0.0-20210317153231-de623e64d2a6 golang.org/x/term v0.0.0-20210503060354-a79de5458b56
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c
google.golang.org/protobuf v1.24.0 // cannot upgrade until warning is fixed google.golang.org/protobuf v1.26.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/yaml.v2 v2.3.0 gopkg.in/yaml.v2 v2.4.0
) )

619
go.sum

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,6 @@ import (
"github.com/google/cel-go/interpreter/functions" "github.com/google/cel-go/interpreter/functions"
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
timestamp "google.golang.org/protobuf/types/known/timestamppb"
) )
func init() { func init() {
@ -231,8 +230,7 @@ func (celTypeAdapter) NativeToValue(value interface{}) ref.Val {
case pkix.Name: case pkix.Name:
return celPkixName{&v} return celPkixName{&v}
case time.Time: case time.Time:
// TODO: eliminate direct protobuf dependency, sigh -- just wrap stdlib time.Time instead... return types.Timestamp{Time: v}
return types.Timestamp{Timestamp: &timestamp.Timestamp{Seconds: v.Unix(), Nanos: int32(v.Nanosecond())}}
case error: case error:
types.NewErr(v.Error()) types.NewErr(v.Error())
} }

View file

@ -29,6 +29,7 @@ import (
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/smallstep/certificates/acme" "github.com/smallstep/certificates/acme"
acmeAPI "github.com/smallstep/certificates/acme/api" acmeAPI "github.com/smallstep/certificates/acme/api"
acmeNoSQL "github.com/smallstep/certificates/acme/db/nosql"
"github.com/smallstep/certificates/authority" "github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/authority/provisioner"
"github.com/smallstep/certificates/db" "github.com/smallstep/certificates/db"
@ -138,17 +139,23 @@ func (ash *Handler) Provision(ctx caddy.Context) error {
return err return err
} }
acmeAuth, err := acme.New(auth, acme.AuthorityOptions{ var acmeDB acme.DB
DB: auth.GetDatabase().(nosql.DB), // stores all the server state if authorityConfig.DB != nil {
DNS: ash.Host, // used for directory links; TODO: not needed acmeDB, err = acmeNoSQL.New(auth.GetDatabase().(nosql.DB))
Prefix: strings.Trim(ash.PathPrefix, "/"), // used for directory links
})
if err != nil { if err != nil {
return err return fmt.Errorf("configuring ACME DB: %v", err)
}
} }
// create the router for the ACME endpoints // create the router for the ACME endpoints
acmeRouterHandler := acmeAPI.New(acmeAuth) acmeRouterHandler := acmeAPI.NewHandler(acmeAPI.HandlerOptions{
CA: auth,
DB: acmeDB, // stores all the server state
DNS: ash.Host, // used for directory links; TODO: not needed (follow-up upstream with step-ca)
Prefix: ash.PathPrefix, // used for directory links
})
// extract its http.Handler so we can use it directly
r := chi.NewRouter() r := chi.NewRouter()
r.Route(ash.PathPrefix, func(r chi.Router) { r.Route(ash.PathPrefix, func(r chi.Router) {
acmeRouterHandler.Route(r) acmeRouterHandler.Route(r)

View file

@ -175,9 +175,7 @@ func (d customCertLifetime) Modify(cert *x509.Certificate, _ provisioner.SignOpt
return nil return nil
} }
const ( const defaultInternalCertLifetime = 12 * time.Hour
defaultInternalCertLifetime = 12 * time.Hour
)
// Interface guards // Interface guards
var ( var (