25#define MAKELONG(a,b) ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16)))
32#define DKIM_HASH_SHA1 1
33#define DKIM_HASH_SHA256 2
34#define DKIM_HASH_SHA1_AND_SHA256 3
35#define DKIM_HASH_ED25519 4
36#define DKIM_HASH_RSA256_AND_ED25519 5
39#define DKIM_CANON_SIMPLE 1
40#define DKIM_CANON_NOWSP 2
41#define DKIM_CANON_RELAXED 3
43#define DKIM_SIGN_SIMPLE MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_SIMPLE)
44#define DKIM_SIGN_SIMPLE_RELAXED MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_SIMPLE)
45#define DKIM_SIGN_RELAXED MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_RELAXED)
46#define DKIM_SIGN_RELAXED_SIMPLE MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_RELAXED)
51#define DKIM_BAD_SYNTAX -2
52#define DKIM_SIGNATURE_BAD -3
53#define DKIM_SIGNATURE_BAD_BUT_TESTING -4
54#define DKIM_SIGNATURE_EXPIRED -5
55#define DKIM_SELECTOR_INVALID -6
56#define DKIM_SELECTOR_GRANULARITY_MISMATCH -7
57#define DKIM_SELECTOR_KEY_REVOKED -8
58#define DKIM_SELECTOR_DOMAIN_NAME_TOO_LONG -9
59#define DKIM_SELECTOR_DNS_TEMP_FAILURE -10
60#define DKIM_SELECTOR_DNS_PERM_FAILURE -11
61#define DKIM_SELECTOR_PUBLIC_KEY_INVALID -12
62#define DKIM_NO_SIGNATURES -13
63#define DKIM_NO_VALID_SIGNATURES -14
64#define DKIM_BODY_HASH_MISMATCH -15
65#define DKIM_SELECTOR_ALGORITHM_MISMATCH -16
66#define DKIM_STAT_INCOMPAT -17
67#define DKIM_UNSIGNED_FROM -18
68#define DKIM_OUT_OF_MEMORY -20
69#define DKIM_INVALID_CONTEXT -21
70#define DKIM_NO_SENDER -22
71#define DKIM_BAD_PRIVATE_KEY -23
72#define DKIM_BUFFER_TOO_SMALL -24
73#define DKIM_MAX_ERROR -25
77#define DKIM_FINISHED_BODY 1
78#define DKIM_PARTIAL_SUCCESS 2
80#define DKIM_SUCCESS_BUT_EXTRA 4
int DKIMSignInit(DKIMContext *pSignContext, DKIMSignOptions *pOptions)
int _DKIM_ReportResult(char const *, char const *, char const *)
struct DKIMVerifyDetails_t DKIMVerifyDetails
int(* DKIMHEADERCALLBACK)(const char *szHeader)
int DKIMVerifyInit(DKIMContext *pVerifyContext, DKIMVerifyOptions *pOptions)
int DKIMSignGetSig2(DKIMContext *pSignContext, char *szRSAPrivKey, char *szECCPrivKey, char **pszSignature)
struct DKIMContext_t DKIMContext
const char * DKIM_ErrorResult(const int)
struct DKIMVerifyOptions_t DKIMVerifyOptions
void DKIMSignFree(DKIMContext *pSignContext)
int DKIMSignProcess(DKIMContext *pSignContext, char *szBuffer, int nBufLength)
void DKIMVerifyFree(DKIMContext *pVerifyContext)
int DKIMVerifyProcess(DKIMContext *pVerifyContext, const char *szBuffer, int nBufLength)
int DKIMVerifyResults(DKIMContext *pVerifyContext)
const char * DKIMGetErrorString(int ErrorCode)
int DKIMVerifyGetDetails(DKIMContext *pVerifyContext, int *nSigCount, DKIMVerifyDetails **pDetails, char *szPractices)
struct DKIMSignOptions_t DKIMSignOptions
int(* DKIMDNSCALLBACK)(const char *szFQDN, char *szBuffer, int nBufLen)
int nIncludeBodyLengthTag
char szRequiredHeaders[256]
DKIMHEADERCALLBACK pfnHeaderCallback
int nIncludeCopiedHeaders
char * szCanonicalizedData
DKIMDNSCALLBACK pfnSelectorCallback
int nAllowUnsignedFromHeaders
int nSaveCanonicalizedData
DKIMDNSCALLBACK pfnPracticesCallback