git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright year in (most) files (those that my script finds).
[exim.git]
/
src
/
src
/
tls-gnu.c
diff --git
a/src/src/tls-gnu.c
b/src/src/tls-gnu.c
index 723d97b4e2a249b29ba5b6cc2bed788cdb65347a..fa307364256b8d44e569955d27f56c62581e3083 100644
(file)
--- a/
src/src/tls-gnu.c
+++ b/
src/src/tls-gnu.c
@@
-1,10
+1,10
@@
-/* $Cambridge: exim/src/src/tls-gnu.c,v 1.
7 2005/06/07 15:20:56
ph10 Exp $ */
+/* $Cambridge: exim/src/src/tls-gnu.c,v 1.
11 2006/02/07 11:19:00
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 200
5
*/
+/* Copyright (c) University of Cambridge 1995 - 200
6
*/
/* See the file NOTICE for conditions of use and distribution. */
/* This module provides TLS (aka SSL) support for Exim using the GnuTLS
/* See the file NOTICE for conditions of use and distribution. */
/* This module provides TLS (aka SSL) support for Exim using the GnuTLS
@@
-256,7
+256,7
@@
static int
init_rsa_dh(host_item *host)
{
int fd;
init_rsa_dh(host_item *host)
{
int fd;
-int ret
= -1
;
+int ret;
gnutls_datum m;
uschar filename[200];
gnutls_datum m;
uschar filename[200];
@@
-299,6
+299,7
@@
if (fd >= 0)
(void)close(fd);
ret = gnutls_rsa_params_import_pkcs1(rsa_params, &m, GNUTLS_X509_FMT_PEM);
(void)close(fd);
ret = gnutls_rsa_params_import_pkcs1(rsa_params, &m, GNUTLS_X509_FMT_PEM);
+
if (ret < 0)
{
DEBUG(D_tls)
if (ret < 0)
{
DEBUG(D_tls)
@@
-318,7
+319,13
@@
if (fd >= 0)
/* If the file does not exist, fall through to compute new data and cache it.
If there was any other opening error, it is serious. */
/* If the file does not exist, fall through to compute new data and cache it.
If there was any other opening error, it is serious. */
-else if (errno != ENOENT)
+else if (errno == ENOENT)
+ {
+ ret = -1;
+ DEBUG(D_tls)
+ debug_printf("parameter cache file %s does not exist\n", filename);
+ }
+else
return tls_error(string_open_failed(errno, "%s for reading", filename),
host, 0);
return tls_error(string_open_failed(errno, "%s for reading", filename),
host, 0);
@@
-391,7
+398,8
@@
if (ret < 0)
return tls_error(string_sprintf("failed to rename %s as %s: %s",
tempfilename, filename, strerror(errno)), host, 0);
return tls_error(string_sprintf("failed to rename %s as %s: %s",
tempfilename, filename, strerror(errno)), host, 0);
- DEBUG(D_tls) debug_printf("wrote RSA and D-H parameters to file\n");
+ DEBUG(D_tls) debug_printf("wrote RSA and D-H parameters to file %s\n",
+ filename);
}
DEBUG(D_tls) debug_printf("initialized RSA and D-H parameters\n");
}
DEBUG(D_tls) debug_printf("initialized RSA and D-H parameters\n");
@@
-499,8
+507,8
@@
if (cas != NULL)
return DEFER;
}
return DEFER;
}
- DEBUG(D_tls) debug_printf("verify certificates = %s size=
%.30g
\n",
- cas_expanded,
(double)
statbuf.st_size);
+ DEBUG(D_tls) debug_printf("verify certificates = %s size=
" OFF_T_FMT "
\n",
+ cas_expanded, statbuf.st_size);
/* If the cert file is empty, there's no point in loading the CRL file. */
/* If the cert file is empty, there's no point in loading the CRL file. */
@@
-856,8
+864,8
@@
if (rc < 0)
if (!sigalrm_seen)
{
if (!sigalrm_seen)
{
- fclose(smtp_out);
- fclose(smtp_in);
+
(void)
fclose(smtp_out);
+
(void)
fclose(smtp_in);
}
return FAIL;
}
return FAIL;