s/qmail 4.3.17
Next generation secure email transport
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
dkim.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DKIMContext_t
 
struct  DKIMSignOptions_t
 
struct  DKIMVerifyOptions_t
 
struct  DKIMVerifyDetails_t
 

Macros

#define MAKELONG(a, b)   ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16)))
 
#define DKIM_HASH_SHA1   1
 
#define DKIM_HASH_SHA256   2
 
#define DKIM_HASH_SHA1_AND_SHA256   3
 
#define DKIM_HASH_ED25519   4
 
#define DKIM_HASH_RSA256_AND_ED25519   5
 
#define DKIM_CANON_SIMPLE   1
 
#define DKIM_CANON_NOWSP   2
 
#define DKIM_CANON_RELAXED   3
 
#define DKIM_SIGN_SIMPLE   MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_SIMPLE)
 
#define DKIM_SIGN_SIMPLE_RELAXED   MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_SIMPLE)
 
#define DKIM_SIGN_RELAXED   MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_RELAXED)
 
#define DKIM_SIGN_RELAXED_SIMPLE   MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_RELAXED)
 
#define DKIM_SUCCESS   0
 
#define DKIM_FAIL   -1
 
#define DKIM_BAD_SYNTAX   -2
 
#define DKIM_SIGNATURE_BAD   -3
 
#define DKIM_SIGNATURE_BAD_BUT_TESTING   -4
 
#define DKIM_SIGNATURE_EXPIRED   -5
 
#define DKIM_SELECTOR_INVALID   -6
 
#define DKIM_SELECTOR_GRANULARITY_MISMATCH   -7
 
#define DKIM_SELECTOR_KEY_REVOKED   -8
 
#define DKIM_SELECTOR_DOMAIN_NAME_TOO_LONG   -9
 
#define DKIM_SELECTOR_DNS_TEMP_FAILURE   -10
 
#define DKIM_SELECTOR_DNS_PERM_FAILURE   -11
 
#define DKIM_SELECTOR_PUBLIC_KEY_INVALID   -12
 
#define DKIM_NO_SIGNATURES   -13
 
#define DKIM_NO_VALID_SIGNATURES   -14
 
#define DKIM_BODY_HASH_MISMATCH   -15
 
#define DKIM_SELECTOR_ALGORITHM_MISMATCH   -16
 
#define DKIM_STAT_INCOMPAT   -17
 
#define DKIM_UNSIGNED_FROM   -18
 
#define DKIM_OUT_OF_MEMORY   -20
 
#define DKIM_INVALID_CONTEXT   -21
 
#define DKIM_NO_SENDER   -22
 
#define DKIM_BAD_PRIVATE_KEY   -23
 
#define DKIM_BUFFER_TOO_SMALL   -24
 
#define DKIM_MAX_ERROR   -25
 
#define DKIM_FINISHED_BODY   1
 
#define DKIM_PARTIAL_SUCCESS   2
 
#define DKIM_NEUTRAL   3
 
#define DKIM_SUCCESS_BUT_EXTRA   4
 

Typedefs

typedef int(* DKIMHEADERCALLBACK) (const char *szHeader)
 
typedef int(* DKIMDNSCALLBACK) (const char *szFQDN, char *szBuffer, int nBufLen)
 
typedef struct DKIMContext_t DKIMContext
 
typedef struct DKIMSignOptions_t DKIMSignOptions
 
typedef struct DKIMVerifyOptions_t DKIMVerifyOptions
 
typedef struct DKIMVerifyDetails_t DKIMVerifyDetails
 

Functions

int DKIMSignInit (DKIMContext *pSignContext, DKIMSignOptions *pOptions)
 
int DKIMSignProcess (DKIMContext *pSignContext, char *szBuffer, int nBufLength)
 
int DKIMSignGetSig2 (DKIMContext *pSignContext, char *szRSAPrivKey, char *szECCPrivKey, char **pszSignature)
 
void DKIMSignFree (DKIMContext *pSignContext)
 
int DKIMVerifyInit (DKIMContext *pVerifyContext, DKIMVerifyOptions *pOptions)
 
int DKIMVerifyProcess (DKIMContext *pVerifyContext, const char *szBuffer, int nBufLength)
 
int DKIMVerifyResults (DKIMContext *pVerifyContext)
 
int DKIMVerifyGetDetails (DKIMContext *pVerifyContext, int *nSigCount, DKIMVerifyDetails **pDetails, char *szPractices)
 
void DKIMVerifyFree (DKIMContext *pVerifyContext)
 
const char * DKIMGetErrorString (int ErrorCode)
 
int _DKIM_ReportResult (char const *, char const *, char const *)
 
const char * DKIM_ErrorResult (const int)
 

Macro Definition Documentation

◆ DKIM_BAD_PRIVATE_KEY

#define DKIM_BAD_PRIVATE_KEY   -23

Definition at line 71 of file dkim.h.

◆ DKIM_BAD_SYNTAX

#define DKIM_BAD_SYNTAX   -2

Definition at line 51 of file dkim.h.

◆ DKIM_BODY_HASH_MISMATCH

#define DKIM_BODY_HASH_MISMATCH   -15

Definition at line 64 of file dkim.h.

◆ DKIM_BUFFER_TOO_SMALL

#define DKIM_BUFFER_TOO_SMALL   -24

Definition at line 72 of file dkim.h.

◆ DKIM_CANON_NOWSP

#define DKIM_CANON_NOWSP   2

Definition at line 40 of file dkim.h.

◆ DKIM_CANON_RELAXED

#define DKIM_CANON_RELAXED   3

Definition at line 41 of file dkim.h.

◆ DKIM_CANON_SIMPLE

#define DKIM_CANON_SIMPLE   1

Definition at line 39 of file dkim.h.

◆ DKIM_FAIL

#define DKIM_FAIL   -1

Definition at line 50 of file dkim.h.

◆ DKIM_FINISHED_BODY

#define DKIM_FINISHED_BODY   1

Definition at line 77 of file dkim.h.

◆ DKIM_HASH_ED25519

#define DKIM_HASH_ED25519   4

Definition at line 35 of file dkim.h.

◆ DKIM_HASH_RSA256_AND_ED25519

#define DKIM_HASH_RSA256_AND_ED25519   5

Definition at line 36 of file dkim.h.

◆ DKIM_HASH_SHA1

#define DKIM_HASH_SHA1   1

Definition at line 32 of file dkim.h.

◆ DKIM_HASH_SHA1_AND_SHA256

#define DKIM_HASH_SHA1_AND_SHA256   3

Definition at line 34 of file dkim.h.

◆ DKIM_HASH_SHA256

#define DKIM_HASH_SHA256   2

Definition at line 33 of file dkim.h.

◆ DKIM_INVALID_CONTEXT

#define DKIM_INVALID_CONTEXT   -21

Definition at line 69 of file dkim.h.

◆ DKIM_MAX_ERROR

#define DKIM_MAX_ERROR   -25

Definition at line 73 of file dkim.h.

◆ DKIM_NEUTRAL

#define DKIM_NEUTRAL   3

Definition at line 79 of file dkim.h.

◆ DKIM_NO_SENDER

#define DKIM_NO_SENDER   -22

Definition at line 70 of file dkim.h.

◆ DKIM_NO_SIGNATURES

#define DKIM_NO_SIGNATURES   -13

Definition at line 62 of file dkim.h.

◆ DKIM_NO_VALID_SIGNATURES

#define DKIM_NO_VALID_SIGNATURES   -14

Definition at line 63 of file dkim.h.

◆ DKIM_OUT_OF_MEMORY

#define DKIM_OUT_OF_MEMORY   -20

Definition at line 68 of file dkim.h.

◆ DKIM_PARTIAL_SUCCESS

#define DKIM_PARTIAL_SUCCESS   2

Definition at line 78 of file dkim.h.

◆ DKIM_SELECTOR_ALGORITHM_MISMATCH

#define DKIM_SELECTOR_ALGORITHM_MISMATCH   -16

Definition at line 65 of file dkim.h.

◆ DKIM_SELECTOR_DNS_PERM_FAILURE

#define DKIM_SELECTOR_DNS_PERM_FAILURE   -11

Definition at line 60 of file dkim.h.

◆ DKIM_SELECTOR_DNS_TEMP_FAILURE

#define DKIM_SELECTOR_DNS_TEMP_FAILURE   -10

Definition at line 59 of file dkim.h.

◆ DKIM_SELECTOR_DOMAIN_NAME_TOO_LONG

#define DKIM_SELECTOR_DOMAIN_NAME_TOO_LONG   -9

Definition at line 58 of file dkim.h.

◆ DKIM_SELECTOR_GRANULARITY_MISMATCH

#define DKIM_SELECTOR_GRANULARITY_MISMATCH   -7

Definition at line 56 of file dkim.h.

◆ DKIM_SELECTOR_INVALID

#define DKIM_SELECTOR_INVALID   -6

Definition at line 55 of file dkim.h.

◆ DKIM_SELECTOR_KEY_REVOKED

#define DKIM_SELECTOR_KEY_REVOKED   -8

Definition at line 57 of file dkim.h.

◆ DKIM_SELECTOR_PUBLIC_KEY_INVALID

#define DKIM_SELECTOR_PUBLIC_KEY_INVALID   -12

Definition at line 61 of file dkim.h.

◆ DKIM_SIGN_RELAXED

#define DKIM_SIGN_RELAXED   MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_RELAXED)

Definition at line 45 of file dkim.h.

◆ DKIM_SIGN_RELAXED_SIMPLE

#define DKIM_SIGN_RELAXED_SIMPLE   MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_RELAXED)

Definition at line 46 of file dkim.h.

◆ DKIM_SIGN_SIMPLE

#define DKIM_SIGN_SIMPLE   MAKELONG(DKIM_CANON_SIMPLE,DKIM_CANON_SIMPLE)

Definition at line 43 of file dkim.h.

◆ DKIM_SIGN_SIMPLE_RELAXED

#define DKIM_SIGN_SIMPLE_RELAXED   MAKELONG(DKIM_CANON_RELAXED,DKIM_CANON_SIMPLE)

Definition at line 44 of file dkim.h.

◆ DKIM_SIGNATURE_BAD

#define DKIM_SIGNATURE_BAD   -3

Definition at line 52 of file dkim.h.

◆ DKIM_SIGNATURE_BAD_BUT_TESTING

#define DKIM_SIGNATURE_BAD_BUT_TESTING   -4

Definition at line 53 of file dkim.h.

◆ DKIM_SIGNATURE_EXPIRED

#define DKIM_SIGNATURE_EXPIRED   -5

Definition at line 54 of file dkim.h.

◆ DKIM_STAT_INCOMPAT

#define DKIM_STAT_INCOMPAT   -17

Definition at line 66 of file dkim.h.

◆ DKIM_SUCCESS

#define DKIM_SUCCESS   0

Definition at line 49 of file dkim.h.

◆ DKIM_SUCCESS_BUT_EXTRA

#define DKIM_SUCCESS_BUT_EXTRA   4

Definition at line 80 of file dkim.h.

◆ DKIM_UNSIGNED_FROM

#define DKIM_UNSIGNED_FROM   -18

Definition at line 67 of file dkim.h.

◆ MAKELONG

#define MAKELONG (   a,
  b 
)    ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16)))

Definition at line 25 of file dkim.h.

Typedef Documentation

◆ DKIMContext

typedef struct DKIMContext_t DKIMContext

◆ DKIMDNSCALLBACK

typedef int(* DKIMDNSCALLBACK) (const char *szFQDN, char *szBuffer, int nBufLen)

Definition at line 89 of file dkim.h.

◆ DKIMHEADERCALLBACK

typedef int(* DKIMHEADERCALLBACK) (const char *szHeader)

Definition at line 86 of file dkim.h.

◆ DKIMSignOptions

◆ DKIMVerifyDetails

◆ DKIMVerifyOptions

Function Documentation

◆ _DKIM_ReportResult()

int _DKIM_ReportResult ( char const *  ResFile,
char const *  result,
char const *  reason 
)

Definition at line 102 of file dkimverify.cpp.

Here is the caller graph for this function:

◆ DKIM_ErrorResult()

const char * DKIM_ErrorResult ( const int  res)

Definition at line 124 of file dkimverify.cpp.

Here is the caller graph for this function:

◆ DKIMGetErrorString()

const char * DKIMGetErrorString ( int  ErrorCode)

Definition at line 192 of file dkim.cpp.

◆ DKIMSignFree()

void DKIMSignFree ( DKIMContext pSignContext)

Definition at line 85 of file dkim.cpp.

Here is the caller graph for this function:

◆ DKIMSignGetSig2()

int DKIMSignGetSig2 ( DKIMContext pSignContext,
char *  szRSAPrivKey,
char *  szECCPrivKey,
char **  pszSignature 
)

Definition at line 77 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMSignInit()

int DKIMSignInit ( DKIMContext pSignContext,
DKIMSignOptions pOptions 
)

Definition at line 53 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMSignProcess()

int DKIMSignProcess ( DKIMContext pSignContext,
char *  szBuffer,
int  nBufLength 
)

Definition at line 69 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMVerifyFree()

void DKIMVerifyFree ( DKIMContext pVerifyContext)

Definition at line 151 of file dkim.cpp.

Here is the caller graph for this function:

◆ DKIMVerifyGetDetails()

int DKIMVerifyGetDetails ( DKIMContext pVerifyContext,
int nSigCount,
DKIMVerifyDetails **  pDetails,
char *  szPractices 
)

Definition at line 136 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMVerifyInit()

int DKIMVerifyInit ( DKIMContext pVerifyContext,
DKIMVerifyOptions pOptions 
)

Definition at line 95 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMVerifyProcess()

int DKIMVerifyProcess ( DKIMContext pVerifyContext,
const char *  szBuffer,
int  nBufLength 
)

Definition at line 115 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DKIMVerifyResults()

int DKIMVerifyResults ( DKIMContext pVerifyContext)

Definition at line 126 of file dkim.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: