SPDX: license tags (mostly by guesswork)
[exim.git] / src / src / dane.c
1 /*************************************************
2 *     Exim - an Internet mail transport agent    *
3 *************************************************/
4
5 /* Copyright (c) University of Cambridge 1995 - 2012, 2014 */
6 /* See the file NOTICE for conditions of use and distribution. */
7 /* SPDX-License-Identifier: GPL-2.0-only */
8
9 /* This module provides DANE (RFC6659) support for Exim.  See also
10 the draft RFC for DANE-over-SMTP, "SMTP security via opportunistic DANE TLS"
11 (V. Dukhovni, W. Hardaker) - version 10, dated May 25, 2014.
12
13 The code for DANE support with Openssl was provided by V.Dukhovni.
14
15 No cryptographic code is included in Exim. All this module does is to call
16 functions from the OpenSSL or GNU TLS libraries. */
17
18
19 #include "exim.h"
20
21 /* This module is compiled only when it is specifically requested in the
22 build-time configuration. However, some compilers don't like compiling empty
23 modules, so keep them happy with a dummy when skipping the rest. Make it
24 reference itself to stop picky compilers complaining that it is unused, and put
25 in a dummy argument to stop even pickier compilers complaining about infinite
26 loops. */
27
28 #ifndef SUPPORT_DANE
29 static void dummy(int x) { dummy(x-1); }
30 #else
31
32 /* Enabling DANE without enabling TLS cannot work. Abort the compilation. */
33 # ifdef DISABLE_TLS
34 #  error DANE support requires that TLS support must be enabled. Abort build.
35 # endif
36
37 /* DNSSEC support is also required */
38 # ifndef RES_USE_DNSSEC
39 #  error DANE support requires that the DNS resolver library supports DNSSEC
40 # endif
41
42 # ifdef USE_OPENSSL
43 #  include "dane-openssl.c"
44 # endif
45
46
47 #endif  /* SUPPORT_DANE */
48
49 /* End of dane.c */