MCPcopy
hub / github.com/caddyserver/caddy / normalizeRules

Method normalizeRules

modules/caddypki/acmeserver/policy.go:67–83  ·  view source on GitHub ↗

normalizeRules returns `nil` if policy is nil, the `Allow` and `Deny` rules are `nil`,

()

Source from the content-addressed store, hash-verified

65
66// normalizeRules returns `nil` if policy is nil, the `Allow` and `Deny` rules are `nil`,
67func (p *Policy) normalizeRules() *provisioner.X509Options {
68 if p == nil {
69 return nil
70 }
71
72 allow := p.normalizeAllowRules()
73 deny := p.normalizeDenyRules()
74 if allow == nil && deny == nil && !p.AllowWildcardNames {
75 return nil
76 }
77
78 return &provisioner.X509Options{
79 AllowedNames: allow,
80 DeniedNames: deny,
81 AllowWildcardNames: p.AllowWildcardNames,
82 }
83}

Callers 2

ProvisionMethod · 0.80

Calls 2

normalizeAllowRulesMethod · 0.95
normalizeDenyRulesMethod · 0.95

Tested by 1