diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:55:05 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:55:05 +0200 |
commit | 1001ed6c2ae98a5b9ed707b7710eb3ae87a0a7ce (patch) | |
tree | f30f7780a24fc6143e49658d696ba8f661bdfcdc /src/include | |
parent | e8046bd96422c3bedaa0f0e693cac28d3458d4bd (diff) |
Downgraded qmail-dkim from C++ to C. Made DKIMContext opaque.
Added functions DKIMContextNew and DKIMContextFree.
Changed fields of DKIMContext.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/dkim.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/include/dkim.h b/src/include/dkim.h index a74b785..64e2c59 100644 --- a/src/include/dkim.h +++ b/src/include/dkim.h @@ -89,11 +89,7 @@ typedef int (*DKIMHEADERCALLBACK)(const char *szHeader); // This function is called to retrieve a TXT record from DNS typedef int (*DKIMDNSCALLBACK)(const char *szFQDN, char *szBuffer, int nBufLen); -typedef struct DKIMContext_t { - unsigned int reserved1; - unsigned int reserved2; - void *reserved3; -} DKIMContext; +struct DKIMContext; typedef struct DKIMSignOptions_t { int nCanon; // canonization @@ -132,18 +128,22 @@ typedef struct DKIMVerifyDetails_t { int nResult; } DKIMVerifyDetails; -int DKIM_CALL DKIMSignInit(DKIMContext *pSignContext, DKIMSignOptions *pOptions); -int DKIM_CALL DKIMSignProcess(DKIMContext *pSignContext, char *szBuffer, int nBufLength); +struct DKIMContext *DKIMContextNew(); +void DKIMContextFree(struct DKIMContext *); + +int DKIM_CALL DKIMSignInit(struct DKIMContext *pSignContext, DKIMSignOptions *pOptions); +int DKIM_CALL DKIMSignProcess(struct DKIMContext *pSignContext, char *szBuffer, int nBufLength); int DKIM_CALL DKIMSignGetSig2( - DKIMContext *pSignContext, char *szRSAPrivKey, char *szECCPrivKey, char **pszSignature); -void DKIM_CALL DKIMSignFree(DKIMContext *pSignContext); + struct DKIMContext *pSignContext, char *szRSAPrivKey, char *szECCPrivKey, char **pszSignature); +void DKIM_CALL DKIMSignFree(struct DKIMContext *pSignContext); -int DKIM_CALL DKIMVerifyInit(DKIMContext *pVerifyContext, DKIMVerifyOptions *pOptions); -int DKIM_CALL DKIMVerifyProcess(DKIMContext *pVerifyContext, const char *szBuffer, int nBufLength); -int DKIM_CALL DKIMVerifyResults(DKIMContext *pVerifyContext); +int DKIM_CALL DKIMVerifyInit(struct DKIMContext *pVerifyContext, DKIMVerifyOptions *pOptions); +int DKIM_CALL DKIMVerifyProcess( + struct DKIMContext *pVerifyContext, const char *szBuffer, int nBufLength); +int DKIM_CALL DKIMVerifyResults(struct DKIMContext *pVerifyContext); int DKIM_CALL DKIMVerifyGetDetails( - DKIMContext *pVerifyContext, int *nSigCount, DKIMVerifyDetails **pDetails, char *szPractices); -void DKIM_CALL DKIMVerifyFree(DKIMContext *pVerifyContext); + struct DKIMContext *pVerifyContext, int *nSigCount, DKIMVerifyDetails **pDetails, char *szPractices); +void DKIM_CALL DKIMVerifyFree(struct DKIMContext *pVerifyContext); // const char *DKIM_CALL DKIMVersion(); |