File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ func (a *Authority) init() error {
709709 options := & scep.Options {
710710 Roots : a .rootX509Certs ,
711711 Intermediates : a .intermediateX509Certs ,
712- SkipValidation : a .config .SkipValidation ,
712+ SkipValidation : a .config .SkipSCEPValidation ,
713713 }
714714
715715 // intermediate certificates can be empty in RA mode
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ type Config struct {
8585 CRL * CRLConfig `json:"crl,omitempty"`
8686 MetricsAddress string `json:"metricsAddress,omitempty"`
8787 SkipValidation bool `json:"-"`
88+ SkipSCEPValidation bool `json:"-"`
8889
8990 // Keeps record of the filename the Config is read from
9091 loadedFromFilepath string
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ type Options struct {
2626 // are used to be able to load the provisioners when the SCEP authority is being
2727 // validated.
2828 SCEPProvisionerNames []string
29- // SkipValidation is used to skip the validation of the options, when implementing custom
30- // integrations
29+ // SkipValidation is used to skip the validation of the SCEP options.
3130 SkipValidation bool
3231}
3332
@@ -37,12 +36,10 @@ type comparablePublicKey interface {
3736
3837// Validate checks the fields in Options.
3938func (o * Options ) Validate () error {
40- if o .SkipValidation {
41- return nil
42- }
4339 switch {
40+ case o .SkipValidation :
41+ return nil
4442 case len (o .Intermediates ) == 0 :
45- return errors .New ("no intermediate certificate available for SCEP authority" )
4643 case o .SignerCert == nil :
4744 return errors .New ("no signer certificate available for SCEP authority" )
4845 }
You can’t perform that action at this time.
0 commit comments