Prechádzať zdrojové kódy

Add support for revocation using an extra provisioner in the RA.

Mariano Cano 5 rokov pred
rodič
commit
bcf70206ac
3 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 1 0
      authority/tls.go
  2. 1 0
      cas/apiv1/requests.go
  3. 1 0
      cas/stepcas/stepcas.go

+ 1 - 0
authority/tls.go

@@ -372,6 +372,7 @@ func (a *Authority) Revoke(ctx context.Context, revokeOpts *RevokeOptions) error
 			SerialNumber: rci.Serial,
 			Reason:       rci.Reason,
 			ReasonCode:   rci.ReasonCode,
+			PassiveOnly:  revokeOpts.PassiveOnly,
 		})
 		if err != nil {
 			return errs.Wrap(http.StatusInternalServerError, err, "authority.Revoke", opts...)

+ 1 - 0
cas/apiv1/requests.go

@@ -86,6 +86,7 @@ type RevokeCertificateRequest struct {
 	SerialNumber string
 	Reason       string
 	ReasonCode   int
+	PassiveOnly  bool
 	RequestID    string
 }
 

+ 1 - 0
cas/stepcas/stepcas.go

@@ -149,6 +149,7 @@ func (s *StepCAS) RevokeCertificate(req *apiv1.RevokeCertificateRequest) (*apiv1
 		ReasonCode: req.ReasonCode,
 		Reason:     req.Reason,
 		OTT:        token,
+		Passive:    req.PassiveOnly,
 	}, nil)
 	if err != nil {
 		return nil, err