mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
go.mod: Update direct dependencies
This commit is contained in:
parent
b4cef492cc
commit
ecd5eeab38
38
go.mod
38
go.mod
|
@ -3,33 +3,33 @@ module github.com/caddyserver/caddy/v2
|
|||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/Masterminds/sprig/v3 v3.1.0
|
||||
github.com/alecthomas/chroma v0.8.2
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a
|
||||
github.com/Masterminds/sprig/v3 v3.2.2
|
||||
github.com/alecthomas/chroma v0.9.1
|
||||
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
|
||||
github.com/caddyserver/certmagic v0.13.1
|
||||
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac
|
||||
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/klauspost/compress v1.11.3
|
||||
github.com/klauspost/compress v1.13.0
|
||||
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/naoina/go-stringutil v0.1.0 // indirect
|
||||
github.com/naoina/toml v0.1.1
|
||||
github.com/prometheus/client_golang v1.9.0
|
||||
github.com/smallstep/certificates v0.15.4
|
||||
github.com/smallstep/cli v0.15.2
|
||||
github.com/smallstep/nosql v0.3.0 // cannot upgrade from v0.3.0 until protobuf warning is fixed
|
||||
github.com/prometheus/client_golang v1.10.1-0.20210603120351-253906201bda
|
||||
github.com/smallstep/certificates v0.15.15
|
||||
github.com/smallstep/cli v0.15.16
|
||||
github.com/smallstep/nosql v0.3.6
|
||||
github.com/smallstep/truststore v0.9.6
|
||||
github.com/yuin/goldmark v1.2.1
|
||||
github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
|
||||
go.uber.org/zap v1.16.0
|
||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
|
||||
golang.org/x/term v0.0.0-20210317153231-de623e64d2a6
|
||||
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98
|
||||
google.golang.org/protobuf v1.24.0 // cannot upgrade until warning is fixed
|
||||
github.com/yuin/goldmark v1.3.7
|
||||
github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01
|
||||
go.uber.org/zap v1.17.0
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56
|
||||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c
|
||||
google.golang.org/protobuf v1.26.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
|
|
@ -35,7 +35,6 @@ import (
|
|||
"github.com/google/cel-go/interpreter/functions"
|
||||
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
|
||||
"google.golang.org/protobuf/proto"
|
||||
timestamp "google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -231,8 +230,7 @@ func (celTypeAdapter) NativeToValue(value interface{}) ref.Val {
|
|||
case pkix.Name:
|
||||
return celPkixName{&v}
|
||||
case time.Time:
|
||||
// TODO: eliminate direct protobuf dependency, sigh -- just wrap stdlib time.Time instead...
|
||||
return types.Timestamp{Timestamp: ×tamp.Timestamp{Seconds: v.Unix(), Nanos: int32(v.Nanosecond())}}
|
||||
return types.Timestamp{Time: v}
|
||||
case error:
|
||||
types.NewErr(v.Error())
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/go-chi/chi"
|
||||
"github.com/smallstep/certificates/acme"
|
||||
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/provisioner"
|
||||
"github.com/smallstep/certificates/db"
|
||||
|
@ -138,17 +139,23 @@ func (ash *Handler) Provision(ctx caddy.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
acmeAuth, err := acme.New(auth, acme.AuthorityOptions{
|
||||
DB: auth.GetDatabase().(nosql.DB), // stores all the server state
|
||||
DNS: ash.Host, // used for directory links; TODO: not needed
|
||||
Prefix: strings.Trim(ash.PathPrefix, "/"), // used for directory links
|
||||
})
|
||||
var acmeDB acme.DB
|
||||
if authorityConfig.DB != nil {
|
||||
acmeDB, err = acmeNoSQL.New(auth.GetDatabase().(nosql.DB))
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("configuring ACME DB: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// 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.Route(ash.PathPrefix, func(r chi.Router) {
|
||||
acmeRouterHandler.Route(r)
|
||||
|
|
|
@ -175,9 +175,7 @@ func (d customCertLifetime) Modify(cert *x509.Certificate, _ provisioner.SignOpt
|
|||
return nil
|
||||
}
|
||||
|
||||
const (
|
||||
defaultInternalCertLifetime = 12 * time.Hour
|
||||
)
|
||||
const defaultInternalCertLifetime = 12 * time.Hour
|
||||
|
||||
// Interface guards
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue
Block a user