MCPcopy Create free account
hub / github.com/cloudflare/cfssl / Valid

Method Valid

config/config.go:608–629  ·  view source on GitHub ↗

Valid checks the signature policies, ensuring they are valid policies. A policy is valid if it has defined at least key usages to be used, and a valid default profile has defined at least a default expiration.

()

Source from the content-addressed store, hash-verified

606// to be used, and a valid default profile has defined at least a
607// default expiration.
608func (p *Signing) Valid() bool {
609 if p == nil {
610 return false
611 }
612
613 log.Debugf("validating configuration")
614 if !p.Default.validProfile(true) {
615 log.Debugf("default profile is invalid")
616 return false
617 }
618
619 for _, sp := range p.Profiles {
620 if !sp.validProfile(false) {
621 log.Debugf("invalid profile")
622 return false
623 }
624 }
625
626 p.warnSkippedSettings()
627
628 return true
629}
630
631// KeyUsage contains a mapping of string names to key usages.
632var KeyUsage = map[string]x509.KeyUsage{

Callers 1

TestBadAuthRemoteConfigFunction · 0.95

Calls 3

warnSkippedSettingsMethod · 0.95
DebugfFunction · 0.92
validProfileMethod · 0.80

Tested by 1

TestBadAuthRemoteConfigFunction · 0.76