Skip to content
/ gitea Public
  • Sponsor go-gitea/gitea

  • Notifications You must be signed in to change notification settings
  • Fork 5.8k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 39d6520

Browse files
committedJan 1, 2025·
fix
1 parent d030cac commit 39d6520

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎cmd/web_acme.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ func runACME(listenAddr string, m http.Handler) error {
5454
altTLSALPNPort = p
5555
}
5656

57+
certmagic.Default.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
5758
magic := certmagic.NewDefault()
58-
magic.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
59+
if magic.Storage != certmagic.Default.Storage {
60+
return fmt.Errorf("failed to set certmagic storage")
61+
}
5962
// Try to use private CA root if provided, otherwise defaults to system's trust
6063
var certPool *x509.CertPool
6164
if setting.AcmeCARoot != "" {

0 commit comments

Comments
 (0)
Please sign in to comment.