2 * PDKIM - a RFC4871 (DKIM) implementation
4 * Copyright (C) 1995 - 2020 Exim maintainers
5 * SPDX-License-Identifier: GPL-2.0-or-later
7 * RSA signing/verification interface
12 #ifndef DISABLE_DKIM /* entire file */
14 #include "crypt_ver.h"
17 # include <openssl/rsa.h>
18 # include <openssl/ssl.h>
19 # include <openssl/err.h>
20 #elif defined(SIGN_GNUTLS)
21 # include <gnutls/gnutls.h>
22 # include <gnutls/x509.h>
23 # include <gnutls/abstract.h>
24 #elif defined(SIGN_GCRYPT)
26 # include <libtasn1.h>
37 KEYFMT_DER, /* an asn.1 structure */
38 KEYFMT_ED25519_BARE /* just the key */
54 #elif defined(SIGN_GNUTLS)
66 #elif defined(SIGN_GCRYPT)
89 extern void exim_dkim_init(void);
90 extern gstring * exim_dkim_data_append(gstring *, uschar *);
92 extern const uschar * exim_dkim_signing_init(const uschar *, es_ctx *);
93 extern const uschar * exim_dkim_sign(es_ctx *, hashmethod, blob *, blob *);
94 extern const uschar * exim_dkim_verify_init(blob *, keyformat, ev_ctx *, unsigned *);
95 extern const uschar * exim_dkim_verify(ev_ctx *, hashmethod, blob *, blob *);
97 #endif /*DISABLE_DKIM*/