Merge branch '4.next'
[exim.git] / src / src / tls-openssl.c
index a95b58acf2d0442858921167fcea95f2a448f593..bc454c8a136d3e71a5b4d9e0ac1a83944b2e7ab3 100644 (file)
@@ -90,6 +90,10 @@ change this guard and punt the issue for a while longer. */
 # endif
 #endif
 
+#if LIBRESSL_VERSION_NUMBER >= 0x3040000fL
+# define EXIM_HAVE_OPENSSL_CIPHER_GET_ID
+#endif
+
 #if !defined(LIBRESSL_VERSION_NUMBER) \
     || LIBRESSL_VERSION_NUMBER >= 0x20010000L
 # if !defined(OPENSSL_NO_ECDH)
@@ -3273,7 +3277,7 @@ else DEBUG(D_tls)
   if (len && name)
     debug_printf("ALPN negotiated: '%.*s'\n", (int)*name, name+1);
   else
-    debug_printf(ALPN: no protocol negotiated\n");
+    debug_printf("ALPN: no protocol negotiated\n");
   }
 #endif
 
@@ -4146,10 +4150,13 @@ return buf;
 
 
 void
-tls_get_cache(void)
+tls_get_cache(unsigned lim)
 {
 #ifndef DISABLE_DKIM
 int n = ssl_xfer_buffer_hwm - ssl_xfer_buffer_lwm;
+debug_printf("tls_get_cache\n");
+if (n > lim)
+  n = lim;
 if (n > 0)
   dkim_exim_verify_feed(ssl_xfer_buffer+ssl_xfer_buffer_lwm, n);
 #endif