mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
24 lines
534 B
Go
24 lines
534 B
Go
//go:build !dev
|
|
|
|
package acme
|
|
|
|
import (
|
|
_ "embed"
|
|
|
|
"github.com/caddyserver/certmagic"
|
|
"github.com/phishingclub/phishingclub/config"
|
|
"go.uber.org/zap"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// SetupCertMagic creates a certmagic config for development
|
|
// and checks which domains are allowed from the db before getting a certificate
|
|
func SetupCertMagic(
|
|
certStoragePath string,
|
|
conf *config.Config,
|
|
db *gorm.DB,
|
|
logger *zap.SugaredLogger,
|
|
) (*certmagic.Config, *certmagic.Cache, error) {
|
|
return setupCertMagic(certStoragePath, conf, db, logger)
|
|
}
|