diff options
-rw-r--r-- | modules/caddypki/ca.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddypki/ca.go b/modules/caddypki/ca.go index 41e78a6..acf8d14 100644 --- a/modules/caddypki/ca.go +++ b/modules/caddypki/ca.go @@ -240,6 +240,9 @@ func (ca *CA) NewAuthority(authorityConfig AuthorityConfig) (*authority.Authorit } func (ca CA) loadOrGenRoot() (rootCert *x509.Certificate, rootKey any, err error) { + if ca.Root != nil { + return ca.Root.Load() + } rootCertPEM, err := ca.storage.Load(ca.ctx, ca.storageKeyRootCert()) if err != nil { if !errors.Is(err, fs.ErrNotExist) { |