OpenSSL: fix complile on pre-EC-capable library versions
[exim.git] / src / src / tls-openssl.c
index e1dcd77bc67b3bf8dcdcb3869e32e747b0f36021..b1dccb8eeeb201b6068ab6d3840d1ce6e2bca286 100644 (file)
@@ -659,15 +659,15 @@ Returns:    TRUE if OK (nothing to set up, or setup worked)
 static BOOL
 init_ecdh(SSL_CTX * sctx, host_item * host)
 {
+#ifdef OPENSSL_NO_ECDH
+return TRUE;
+#else
+
 EC_KEY * ecdh;
 uschar * exp_curve;
 int nid;
 BOOL rv;
 
-#ifdef OPENSSL_NO_ECDH
-return TRUE;
-#else
-
 if (host)      /* No ECDH setup for clients, only for servers */
   return TRUE;
 
@@ -708,7 +708,7 @@ if (  (nid = OBJ_sn2nid       (CCS exp_curve)) == NID_undef
 
 if (!(ecdh = EC_KEY_new_by_curve_name(nid)))
   {
-  tls_error("Unable to create ec curve", host, NULL);
+  tls_error(US"Unable to create ec curve", host, NULL);
   return FALSE;
   }