X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftls-openssl.c;h=a9251c7f46c68943a1e07b271ac3c3015c1d933b;hb=0a49a7a4f1090b6f1ce1d0f9d969804c9226b53e;hp=dc20a6e3fb8be1b089ea3862f407976def0713d2;hpb=cf1ef1a94d235f4bf3a1585fa0e0920b8f409af6;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index dc20a6e3f..a9251c7f4 100644 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@ -1,10 +1,10 @@ -/* $Cambridge: exim/src/src/tls-openssl.c,v 1.18 2009/10/16 11:38:01 tom Exp $ */ +/* $Cambridge: exim/src/src/tls-openssl.c,v 1.22 2009/11/16 19:50:37 nm4 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2007 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* See the file NOTICE for conditions of use and distribution. */ /* This module provides the TLS (aka SSL) support for Exim using the OpenSSL @@ -73,13 +73,13 @@ tls_error(uschar *prefix, host_item *host, uschar *msg) if (msg == NULL) { ERR_error_string(ERR_get_error(), ssl_errstring); - msg = ssl_errstring; + msg = (uschar *)ssl_errstring; } if (host == NULL) { uschar *conn_info = smtp_get_connection_info(); - if (strncmp(conn_info, "SMTP ", 5) == 0) + if (Ustrncmp(conn_info, US"SMTP ", 5) == 0) conn_info += 5; log_write(0, LOG_MAIN, "TLS error on %s (%s): %s", conn_info, prefix, msg); @@ -253,7 +253,7 @@ if (dhexpanded == NULL) return TRUE; if ((bio = BIO_new_file(CS dhexpanded, "r")) == NULL) { tls_error(string_sprintf("could not read dhparams file %s", dhexpanded), - host, strerror(errno)); + host, (uschar *)strerror(errno)); yield = FALSE; } else @@ -305,7 +305,7 @@ tls_init(host_item *host, uschar *dhparam, uschar *certificate, SSL_load_error_strings(); /* basic set up */ OpenSSL_add_ssl_algorithms(); -#if OPENSSL_VERSION_NUMBER >= 0x00908000L +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) /* SHA256 is becoming ever moar popular. This makes sure it gets added to the list of available digests. */ EVP_add_digest(EVP_sha256()); @@ -338,7 +338,7 @@ if (!RAND_status()) if (!RAND_status()) return tls_error(US"RAND_status", host, - "unable to seed random number generator"); + US"unable to seed random number generator"); } /* Set up the information callback, which outputs if debugging is at a suitable @@ -621,7 +621,7 @@ uschar *expciphers; if (tls_active >= 0) { - tls_error("STARTTLS received after TLS started", NULL, ""); + tls_error(US"STARTTLS received after TLS started", NULL, US""); smtp_printf("554 Already in TLS\r\n"); return FAIL; }