Add interface documentation for the DANE library
[exim.git] / src / src / dane.c
CommitLineData
e682570f
TL
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
5/* Copyright (c) University of Cambridge 1995 - 2012 */
6/* See the file NOTICE for conditions of use and distribution. */
7
8/* This module provides TLS (aka SSL) support for Exim. The code for OpenSSL is
9based on a patch that was originally contributed by Steve Haslam. It was
10adapted from stunnel, a GPL program by Michal Trojnara. The code for GNU TLS is
11based on a patch contributed by Nikos Mavroyanopoulos. Because these packages
12are so very different, the functions for each are kept in separate files. The
13relevant file is #included as required, after any any common functions.
14
15No cryptographic code is included in Exim. All this module does is to call
16functions 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
22build-time configuration. However, some compilers don't like compiling empty
23modules, so keep them happy with a dummy when skipping the rest. Make it
24reference itself to stop picky compilers complaining that it is unused, and put
25in a dummy argument to stop even pickier compilers complaining about infinite
26loops. */
27
28#ifndef EXPERIMENTAL_DANE
29static void dummy(int x) { dummy(x-1); }
30#else
31
32/* Enabling DANE without enabling TLS cannot work. Abort the compilation. */
33#ifndef SUPPORT_TLS
34#error DANE support requires that TLS support must be enabled. Abort build.
35#endif
36
37#ifdef USE_GNUTLS
38#include "dane-gnu.c"
39#else
40#include "dane-openssl.c"
41#endif
42
43
44#endif /* EXPERIMENTAL_DANE */
45
46/* End of dane.c */