code: func (ra *RegistrationAuthorityImpl) checkAuthorizations(ctx context.Context, names []string, regID int64) (map[string]*core.Authorization, error) {
  	now := ra.clk.Now()
  	for i := range names {
  		names[i] = strings.ToLower(names[i])
  	}
  	auths, err := ra.SA.GetValidAuthorizations(ctx, regID, names, now)
  	if err != nil {
  		return nil, berrors.InternalServerError("error in GetValidAuthorizations: %s", err)
  	}
  
  	if err = ra.checkAuthorizationsCAA(ctx, names, auths, regID, now); err != nil {
  		return nil, err
  	}
  
  	return auths, nil
  }
docs: // checkAuthorizations checks that each requested name has a valid authorization
  // that won't expire before the certificate expires. It returns the
  // authorizations that satisifed the set of names or it returns an error.
  // If it returns an error, it will be of type BoulderError.