git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix build with older GnuTLS, redux
[exim.git]
/
src
/
src
/
tlscert-openssl.c
diff --git
a/src/src/tlscert-openssl.c
b/src/src/tlscert-openssl.c
index 938b0abb8a4123a62af6238ed9245f25b1cb4b00..f9808b3542435f68d50326aba26f9792022b51a9 100644
(file)
--- a/
src/src/tlscert-openssl.c
+++ b/
src/src/tlscert-openssl.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) Jeremy Harris 2014 - 201
8
*/
+/* Copyright (c) Jeremy Harris 2014 - 201
9
*/
/* This module provides TLS (aka SSL) support for Exim using the OpenSSL
library. It is #included into the tls.c file when that library is used.
/* This module provides TLS (aka SSL) support for Exim using the OpenSSL
library. It is #included into the tls.c file when that library is used.
@@
-17,8
+17,14
@@
library. It is #included into the tls.c file when that library is used.
#include <openssl/rand.h>
#include <openssl/x509v3.h>
#include <openssl/rand.h>
#include <openssl/x509v3.h>
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-# define EXIM_HAVE_ASN1_MACROS
+#ifdef LIBRESSL_VERSION_NUMBER /* LibreSSL */
+# if LIBRESSL_VERSION_NUMBER >= 0x2090000fL
+# define EXIM_HAVE_ASN1_MACROS
+# endif
+#else /* OpenSSL */
+# if OPENSSL_VERSION_NUMBER >= 0x10100000L
+# define EXIM_HAVE_ASN1_MACROS
+# endif
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
@@
-477,7
+483,7
@@
if (!i2d_X509_bio(bp, (X509 *)cert))
else
{
long len = BIO_get_mem_data(bp, &cp);
else
{
long len = BIO_get_mem_data(bp, &cp);
- cp = b64encode(cp, (int)len);
+ cp = b64encode(
CUS
cp, (int)len);
}
BIO_free(bp);
}
BIO_free(bp);