X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Ftls.c;h=92a36332d12d6c21099b43a307611ea6a1c20d61;hb=c4ceed07f17f67af7d96e7fd27c92eb374e62e19;hp=1077b526c99da9fbd9fa6e50d791a0ceeefd0d0a;hpb=d7d7b7b91dd75cec636fc144da7e27eed860f971;p=exim.git diff --git a/src/src/tls.c b/src/src/tls.c index 1077b526c..92a36332d 100644 --- a/src/src/tls.c +++ b/src/src/tls.c @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/tls.c,v 1.3 2006/02/07 11:19:00 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2012 */ /* See the file NOTICE for conditions of use and distribution. */ /* This module provides TLS (aka SSL) support for Exim. The code for OpenSSL is @@ -36,12 +34,13 @@ functions and the common functions below. */ static uschar *ssl_xfer_buffer = NULL; -static int ssl_xfer_buffer_size = 4096; +static const int ssl_xfer_buffer_size = 4096; static int ssl_xfer_buffer_lwm = 0; static int ssl_xfer_buffer_hwm = 0; static int ssl_xfer_eof = 0; static int ssl_xfer_error = 0; +uschar *tls_channelbinding_b64 = NULL; /************************************************* @@ -60,11 +59,11 @@ Returns: TRUE if OK; result may still be NULL after forced failure */ static BOOL -expand_check(uschar *s, uschar *name, uschar **result) +expand_check(const uschar *s, const uschar *name, uschar **result) { if (s == NULL) *result = NULL; else { - *result = expand_string(s); + *result = expand_string(US s); /* need to clean up const some more */ if (*result == NULL && !expand_string_forcedfail) { log_write(0, LOG_MAIN|LOG_PANIC, "expansion of %s failed: %s", name, @@ -147,6 +146,24 @@ tls_ferror(void) return ssl_xfer_error; } + +/************************************************* +* TLS version of smtp_buffered * +*************************************************/ + +/* Tests for unused chars in the TLS input buffer. + +Arguments: none +Returns: TRUE/FALSE +*/ + +BOOL +tls_smtp_buffered(void) +{ +return ssl_xfer_buffer_lwm < ssl_xfer_buffer_hwm; +} + + #endif /* SUPPORT_TLS */ /* End of tls.c */