summaryrefslogtreecommitdiff
path: root/modules/caddytls
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-06-01 09:31:08 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-06-01 09:31:08 -0600
commitd5d7fb5954f38ed5f4c4bbb8a8b3df66809a32b7 (patch)
tree4dcd87d56558b3ee62fa1ca4134ef66c916747e8 /modules/caddytls
parent996af0915dfc597fc6aad82e99578fed58d0f87d (diff)
go.mod: Update dependencies
Diffstat (limited to 'modules/caddytls')
-rw-r--r--modules/caddytls/distributedstek/distributedstek.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/caddytls/distributedstek/distributedstek.go b/modules/caddytls/distributedstek/distributedstek.go
index 807f2bb..f29db29 100644
--- a/modules/caddytls/distributedstek/distributedstek.go
+++ b/modules/caddytls/distributedstek/distributedstek.go
@@ -53,6 +53,7 @@ type Provider struct {
storage certmagic.Storage
stekConfig *caddytls.SessionTicketService
timer *time.Timer
+ ctx caddy.Context
}
// CaddyModule returns the Caddy module information.
@@ -65,6 +66,8 @@ func (Provider) CaddyModule() caddy.ModuleInfo {
// Provision provisions s.
func (s *Provider) Provision(ctx caddy.Context) error {
+ s.ctx = ctx
+
// unpack the storage module to use, if different from the default
if s.Storage != nil {
val, err := ctx.LoadModule(s, "Storage")
@@ -142,7 +145,7 @@ func (s *Provider) storeSTEK(dstek distributedSTEK) error {
// current STEK is outdated (NextRotation time is in the past),
// then it is rotated and persisted. The resulting STEK is returned.
func (s *Provider) getSTEK() (distributedSTEK, error) {
- s.storage.Lock(stekLockName)
+ s.storage.Lock(s.ctx, stekLockName)
defer s.storage.Unlock(stekLockName)
// load the current STEKs from storage