From d5d7fb5954f38ed5f4c4bbb8a8b3df66809a32b7 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 1 Jun 2020 09:31:08 -0600 Subject: go.mod: Update dependencies --- modules/caddytls/distributedstek/distributedstek.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.3