2 * PDKIM - a RFC4871 (DKIM) implementation
4 * Copyright (C) 1995 - 2018 Exim maintainers
6 * RSA signing/verification interface
11 #ifndef DISABLE_DKIM /* entire file */
13 #include "crypt_ver.h"
16 # include <openssl/rsa.h>
17 # include <openssl/ssl.h>
18 # include <openssl/err.h>
19 #elif defined(SIGN_GNUTLS)
20 # include <gnutls/gnutls.h>
21 # include <gnutls/x509.h>
22 # include <gnutls/abstract.h>
23 #elif defined(SIGN_GCRYPT)
25 # include <libtasn1.h>
36 KEYFMT_DER, /* an asn.1 structure */
37 KEYFMT_ED25519_BARE /* just the key */
53 #elif defined(SIGN_GNUTLS)
65 #elif defined(SIGN_GCRYPT)
88 extern void exim_dkim_init(void);
89 extern gstring * exim_dkim_data_append(gstring *, uschar *);
91 extern const uschar * exim_dkim_signing_init(const uschar *, es_ctx *);
92 extern const uschar * exim_dkim_sign(es_ctx *, hashmethod, blob *, blob *);
93 extern const uschar * exim_dkim_verify_init(blob *, keyformat, ev_ctx *);
94 extern const uschar * exim_dkim_verify(ev_ctx *, hashmethod, blob *, blob *);
96 #endif /*DISABLE_DKIM*/