aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2008-07-03 14:33:53 +0000
committerMatthias Andree <matthias.andree@gmx.de>2008-07-03 14:33:53 +0000
commit7cf37fb82f0030b6582c8b53191a6712a4085c5d (patch)
tree0e6ba4459fc4b1a579f9566c59aa44e1f6d09516
parent9ebfa320b724b6e745d768a003ef7086f091565e (diff)
downloadfetchmail-7cf37fb82f0030b6582c8b53191a6712a4085c5d.tar.gz
fetchmail-7cf37fb82f0030b6582c8b53191a6712a4085c5d.tar.bz2
fetchmail-7cf37fb82f0030b6582c8b53191a6712a4085c5d.zip
Partially uncommit the botched commit r5117 so I can create proper changelogs.
svn path=/branches/BRANCH_6-3/; revision=5212
-rw-r--r--socket.c9
-rw-r--r--uid.c6
2 files changed, 6 insertions, 9 deletions
diff --git a/socket.c b/socket.c
index 4c074ec2..1af4a393 100644
--- a/socket.c
+++ b/socket.c
@@ -800,8 +800,8 @@ int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char
struct stat randstat;
int i;
- SSLeay_add_ssl_algorithms();
SSL_load_error_strings();
+ SSLeay_add_ssl_algorithms();
#ifdef SSL_ENABLE
if (stat("/dev/random", &randstat) &&
@@ -851,8 +851,6 @@ int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char
return(-1);
}
- SSL_CTX_set_options(_ctx[sock], SSL_OP_ALL);
-
if (certck) {
SSL_CTX_set_verify(_ctx[sock], SSL_VERIFY_PEER, SSL_ck_verify_callback);
} else {
@@ -903,8 +901,9 @@ int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char
SSL_use_RSAPrivateKey_file(_ssl_context[sock], mykey, SSL_FILETYPE_PEM);
}
- if (SSL_set_fd(_ssl_context[sock], sock) == 0
- || SSL_connect(_ssl_context[sock]) < 1) {
+ SSL_set_fd(_ssl_context[sock], sock);
+
+ if(SSL_connect(_ssl_context[sock]) < 1) {
ERR_print_errors_fp(stderr);
SSL_CTX_free(_ctx[sock]);
_ctx[sock] = NULL;
diff --git a/uid.c b/uid.c
index a4164b44..82bb4add 100644
--- a/uid.c
+++ b/uid.c
@@ -612,10 +612,8 @@ void write_saved_lists(struct query *hostlist, const char *idfile)
/* either nuke the file or write updated last-seen IDs */
if (!idcount && !scratchlist)
{
- if (outlevel >= O_DEBUG) {
- if (access(idfile, F_OK) == 0)
- report(stdout, GT_("Deleting fetchids file.\n"));
- }
+ if (outlevel >= O_DEBUG)
+ report(stdout, GT_("Deleting fetchids file.\n"));
if (unlink(idfile) && errno != ENOENT)
report(stderr, GT_("Error deleting %s: %s\n"), idfile, strerror(errno));
} else {