[exim-cvs] Guard SNI usage better (client-side)

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Guard SNI usage better (client-side)
Gitweb: http://git.exim.org/exim.git/commitdiff/35731706f3f742d1999e36ce555c8f991d83a3a0
Commit:     35731706f3f742d1999e36ce555c8f991d83a3a0
Parent:     d40f27c34fca5f571ad130157d8499413a4b6939
Author:     Phil Pennock <pdp@???>
AuthorDate: Mon May 21 21:58:00 2012 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Mon May 21 21:58:00 2012 -0400


    Guard SNI usage better (client-side)
---
 src/src/tls-openssl.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index eeab9c1..ebc5a62 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -46,7 +46,9 @@ static BOOL verify_callback_called = FALSE;
static const uschar *sid_ctx = US"exim";

static SSL_CTX *ctx = NULL;
+#ifdef EXIM_HAVE_OPENSSL_TLSEXT
static SSL_CTX *ctx_sni = NULL;
+#endif
static SSL *ssl = NULL;

 static char ssl_errstring[256];
@@ -1257,8 +1259,14 @@ if (sni)
     tls_sni = NULL;
   else
     {
+#ifdef EXIM_HAVE_OPENSSL_TLSEXT
     DEBUG(D_tls) debug_printf("Setting TLS SNI \"%s\"\n", tls_sni);
     SSL_set_tlsext_host_name(ssl, tls_sni);
+#else
+    DEBUG(D_tls)
+      debug_printf("OpenSSL at build-time lacked SNI support, ignoring \"%s\"\n",
+          tls_sni);
+#endif
     }
   }