opendmarc_policy_store_dkim()

[back to index]

SYNOPSIS
#include <dmarc.h>
DMARC_POLICY_T * opendmarc_policy_store_dkim(
	DMARC_POLICY_T * pctx,
	u_char *d_equal_domain, int dkim_result, u_char *human_result
);
Once you have found the outcome of each DKIM check, no matter how many, you may call this function to prepare it for a DMARC policy decision.
DESCRIPTION
Called When opendmarc_policy_store_dkim() may be called after each DKIM signature in the message is verified. That is, this function may be called one, or many times.
ARGUMENTS
ArgumentDescription
pctx A pointer to type DMARC_POLICY_T.
d_equal_domain A pointer to an unsigned string containing the domain found in the d= record of the DKIM signature.
dkim_result Integer specifying the result of the DKIM check. Choose from one of: DMARC_POLICY_DKIM_OUTCOME_NONE if there was no DKIM signature; DMARC_POLICY_DKIM_OUTCOME_PASS if the DKIM check passed; DMARC_POLICY_DKIM_OUTCOME_FAIL if the DKIM check failed; or DMARC_POLICY_DKIM_OUTCOME_TMPFAIL if the check returned a temporary failure.
human_result If not NULL, is a string containing an arbitrary, human readable and friendly DKIM result.
RETURN VALUES
  • DMARC_PARSE_OKAY -- On success
  • DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
  • DMARC_PARSE_ERROR_EMPTY -- If domain was NULL or zero length
  • DMARC_PARSE_ERROR_NO_DOMAIN -- If domain did not contain a domain, e.g. "<>"
  • DMARC_PARSE_ERROR_NO_ALLOC -- If memory allocation failed
NOTES
  • You may feed this function results from multiple DKIM signatures. This function will select the most successful check from among those that align with the header From: domain.
  • You should not call this function if there were no DKIM signatures, because the library presumes there will be none unless told otherwise.

Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the license.