Herman Slatman 3 лет назад
Родитель
Сommit
c0fbace882
2 измененных файлов с 7 добавлено и 13 удалено
  1. 4 4
      authority/authority.go
  2. 3 9
      authority/options.go

+ 4 - 4
authority/authority.go

@@ -707,13 +707,13 @@ func (a *Authority) init() error {
 				}
 			}
 
-			// provide the current SCEP provisioner names, so that the provisioners
-			// can be validated when the CA is started.
-			options.SCEPProvisionerNames = a.getSCEPProvisionerNames()
-
 			a.scepOptions = options
 		}
 
+		// provide the current SCEP provisioner names, so that the provisioners
+		// can be validated when the CA is started.
+		a.scepOptions.SCEPProvisionerNames = a.getSCEPProvisionerNames()
+
 		// create a new SCEP authority
 		scepAuthority, err := scep.New(a, *a.scepOptions)
 		if err != nil {

+ 3 - 9
authority/options.go

@@ -206,15 +206,9 @@ func WithX509SignerFunc(fn func() ([]*x509.Certificate, crypto.Signer, error)) O
 	}
 }
 
-// func WithSCEPOptions(crt *x509.Certificate, s crypto.Signer, d crypto.Decrypter) Option {
-// 	return func(a *Authority) error {
-// 		a.scepCertificate = crt
-// 		a.scepSigner = s
-// 		a.scepDecrypter = d
-// 		return nil
-// 	}
-// }
-
+// WithFullSCEPOptions defines the options used for SCEP support.
+//
+// This feature is EXPERIMENTAL and might change at any time.
 func WithFullSCEPOptions(options *scep.Options) Option {
 	return func(a *Authority) error {
 		a.scepOptions = options