Commit 6d9fa64 1 parent c13b180 commit 6d9fa64 Copy full SHA for 6d9fa64
File tree 3 files changed +5
-7
lines changed
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 {
709
709
options := & scep.Options {
710
710
Roots : a .rootX509Certs ,
711
711
Intermediates : a .intermediateX509Certs ,
712
- SkipValidation : a .config .SkipValidation ,
712
+ SkipValidation : a .config .SkipSCEPValidation ,
713
713
}
714
714
715
715
// 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 {
85
85
CRL * CRLConfig `json:"crl,omitempty"`
86
86
MetricsAddress string `json:"metricsAddress,omitempty"`
87
87
SkipValidation bool `json:"-"`
88
+ SkipSCEPValidation bool `json:"-"`
88
89
89
90
// Keeps record of the filename the Config is read from
90
91
loadedFromFilepath string
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ type Options struct {
26
26
// are used to be able to load the provisioners when the SCEP authority is being
27
27
// validated.
28
28
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.
31
30
SkipValidation bool
32
31
}
33
32
@@ -37,12 +36,10 @@ type comparablePublicKey interface {
37
36
38
37
// Validate checks the fields in Options.
39
38
func (o * Options ) Validate () error {
40
- if o .SkipValidation {
41
- return nil
42
- }
43
39
switch {
40
+ case o .SkipValidation :
41
+ return nil
44
42
case len (o .Intermediates ) == 0 :
45
- return errors .New ("no intermediate certificate available for SCEP authority" )
46
43
case o .SignerCert == nil :
47
44
return errors .New ("no signer certificate available for SCEP authority" )
48
45
}
You can’t perform that action at this time.
0 commit comments