Skip to content

Commit c13b180

Browse files
committed
wire SkipValidation further into SCEP provisioner
1 parent 5b1eebd commit c13b180

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

authority/authority.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,9 @@ func (a *Authority) init() error {
707707
case a.requiresSCEP() && a.GetSCEP() == nil:
708708
if a.scepOptions == nil {
709709
options := &scep.Options{
710-
Roots: a.rootX509Certs,
711-
Intermediates: a.intermediateX509Certs,
710+
Roots: a.rootX509Certs,
711+
Intermediates: a.intermediateX509Certs,
712+
SkipValidation: a.config.SkipValidation,
712713
}
713714

714715
// intermediate certificates can be empty in RA mode

scep/options.go

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ 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
31+
SkipValidation bool
2932
}
3033

3134
type comparablePublicKey interface {
@@ -34,6 +37,9 @@ type comparablePublicKey interface {
3437

3538
// Validate checks the fields in Options.
3639
func (o *Options) Validate() error {
40+
if o.SkipValidation {
41+
return nil
42+
}
3743
switch {
3844
case len(o.Intermediates) == 0:
3945
return errors.New("no intermediate certificate available for SCEP authority")

0 commit comments

Comments
 (0)