code: func (va *ValidationAuthorityImpl) checkCAA(
  	ctx context.Context,
  	identifier core.AcmeIdentifier,
  	params *caaParams) *probs.ProblemDetails {
  	present, valid, records, err := va.checkCAARecords(ctx, identifier, params)
  	if err != nil {
  		return probs.DNS("%v", err)
  	}
  
  	recordsStr, err := json.Marshal(&records)
  	if err != nil {
  		return probs.CAA("CAA records for %s were malformed", identifier.Value)
  	}
  
  	accountID, challengeType := "unknown", "unknown"
  	if params.accountURIID != nil {
  		accountID = fmt.Sprintf("%d", *params.accountURIID)
  	}
  	if params.validationMethod != nil {
  		challengeType = *params.validationMethod
  	}
  
  	va.log.AuditInfof("Checked CAA records for %s, [Present: %t, Account ID: %s, Challenge: %s, Valid for issuance: %t] Records=%s",
  		identifier.Value, present, accountID, challengeType, valid, recordsStr)
  	if !valid {
  		return probs.CAA("CAA record for %s prevents issuance", identifier.Value)
  	}
  	return nil
  }
docs: // checkCAA performs a CAA lookup & validation for the provided identifier. If
  // the CAA lookup & validation fail a problem is returned.