| 1 | /************************************************* |
| 2 | * Exim - an Internet mail transport agent * |
| 3 | *************************************************/ |
| 4 | |
| 5 | /* Copyright (c) Jeremy Harris 2016 */ |
| 6 | /* See the file NOTICE for conditions of use and distribution. */ |
| 7 | |
| 8 | /* SHA routine selection */ |
| 9 | |
| 10 | #include "exim.h" |
| 11 | |
| 12 | #ifdef SUPPORT_TLS |
| 13 | |
| 14 | # define EXIM_HAVE_SHA2 |
| 15 | |
| 16 | # ifdef USE_GNUTLS |
| 17 | # include <gnutls/gnutls.h> |
| 18 | |
| 19 | # if GNUTLS_VERSION_NUMBER >= 0x020a00 |
| 20 | # define SHA_GNUTLS |
| 21 | # if GNUTLS_VERSION_NUMBER >= 0x030500 |
| 22 | # define EXIM_HAVE_SHA3 |
| 23 | # endif |
| 24 | # else |
| 25 | # define SHA_GCRYPT |
| 26 | # endif |
| 27 | |
| 28 | # else |
| 29 | # define SHA_OPENSSL |
| 30 | # endif |
| 31 | |
| 32 | #else |
| 33 | # define SHA_NATIVE |
| 34 | #endif |
| 35 | |