@@ -714,6 +714,15 @@ func (ra *RegistrationAuthorityImpl) checkOrderAuthorizations(
714714 return nil , berrors .UnauthorizedError ("incorrect number of identifiers requested for finalization" )
715715 }
716716
717+ if ! features .Get ().CAARechecksFailOrder {
718+ // Check that the authzs either don't need CAA rechecking, or do the
719+ // necessary CAA rechecks right now.
720+ err = ra .checkAuthorizationsCAA (ctx , int64 (acctID ), authzs , now )
721+ if err != nil {
722+ return nil , err
723+ }
724+ }
725+
717726 return authzs , nil
718727}
719728
@@ -932,11 +941,10 @@ func (ra *RegistrationAuthorityImpl) FinalizeOrder(ctx context.Context, req *rap
932941 return nil , errIncompleteGRPCRequest
933942 }
934943
935- requester := req .Order .RegistrationID
936944 logEvent := certificateRequestEvent {
937945 ID : core .NewToken (),
938946 OrderID : req .Order .Id ,
939- Requester : requester ,
947+ Requester : req . Order . RegistrationID ,
940948 RequestTime : ra .clk .Now (),
941949 UserAgent : web .UserAgent (ctx ),
942950 }
@@ -1292,11 +1300,13 @@ func (ra *RegistrationAuthorityImpl) issueCertificateInner(
12921300 return fmt .Errorf ("%s: %s" , prefix , e )
12931301 }
12941302
1295- // Check that the authzs either don't need CAA rechecking, or do the
1296- // necessary CAA rechecks right now.
1297- err := ra .checkAuthorizationsCAA (ctx , int64 (acctID ), authzs , ra .clk .Now ())
1298- if err != nil {
1299- return nil , err
1303+ if features .Get ().CAARechecksFailOrder {
1304+ // Check that the authzs either don't need CAA rechecking, or do the
1305+ // necessary CAA rechecks right now.
1306+ err := ra .checkAuthorizationsCAA (ctx , int64 (acctID ), authzs , ra .clk .Now ())
1307+ if err != nil {
1308+ return nil , err
1309+ }
13001310 }
13011311
13021312 issueReq := & capb.IssueCertificateRequest {
0 commit comments