Commit 7e9f1e08 authored by Matthias Andree's avatar Matthias Andree

Merge branch 'legacy_6x'

parents 2e881eb6 a3897956
......@@ -5,10 +5,7 @@ AUTOMAKE_OPTIONS= 1.11 foreign no-dist-gzip dist-xz color-tests parallel-tests s
ACLOCAL_AMFLAGS= -I m4 -I m4-local
AM_YFLAGS= -d
# listing socket.$(OBJEXT) here is a hack to compile socket.c pretty
# early in order to fail it early on outdated OpenSSL libraries,
# without building a few dozen other files first.
BUILT_SOURCES= rcfile_y.h socket.$(OBJEXT)
BUILT_SOURCES= rcfile_y.h
bin_PROGRAMS= fetchmail
......
......@@ -12,8 +12,8 @@ can then be be read by normal mail user agents such as mutt(1), elm(1) or
Mail(1).
Fetchmail supports all standard mail-retrieval protocols in use on the
Internet: POP3 (including some variants such as APOP, KPOP), IMAP4rev1
(also IMAP4, IMAP2bis), IMAP4, ETRN, and ODMR. On the output side,
Internet: POP3 (including some variants such as RPOP, APOP, KPOP), IMAP4rev1
(also IMAP4, IMAP2bis), POP2, IMAP4, ETRN, and ODMR. On the output side,
fetchmail supports ESMTP/SMTP, LMTP, and invocation of a local delivery agent.
Fetchmail also fully supports authentication via GSSAPI, Kerberos 4 and 5,
......@@ -31,13 +31,15 @@ The fetchmail code was developed under Linux, but has also been extensively
tested under the BSD variants, AIX, HP-UX versions 9 and 10, SunOS, Solaris,
NEXTSTEP, OSF 3.2, IRIX, and Rhapsody once upon a time.
The current maintainer does not have access to these systems, and assumes that
the system is at least Single-Unix-Specification V3 compatible, and that will
also require a C99 compiler.
The current maintainer does not have access to these systems, and assumes that
the system is at least Single-Unix-Specification V3 compatible, and that
will also require a C99 compiler.
Fetchmail should be able to be compiled with C99, C11, C++98, C++03, C++11,
C++14 compilers, but not C++17 because the "register" keyword is used in some
parts of the code.
Fetchmail should be able to be compiled with C99, C11, C++98, C++03,
C++11, C++14 and C++17 compilers.
Future fetchmail releases will require modern language features such as
"long long" and others, so this release is the last to support C89.
Further reading
---------------
......
......@@ -5,7 +5,6 @@
* For license terms, see the file COPYING in this directory.
*/
/* We need this for HAVE_STDARG_H, etc */
#include "config.h"
struct addrinfo;
......@@ -199,10 +198,10 @@ struct idlist
/** List of possible values for idlist::mark */
enum {
UID_UNSEEN= 0, /**< id hasn't been seen */
UID_SEEN= 1, /**< id was seen, but not deleted */
UID_DELETED= 2, /**< this message has been marked deleted */
UID_EXPUNGED= 3 /**< this message has been expunged */
UID_UNSEEN= 0, /**< id hasn't been seen */
UID_SEEN= 1, /**< id was seen, but not deleted */
UID_DELETED= 2, /**< this message has been marked deleted */
UID_EXPUNGED= 3 /**< this message has been expunged */
};
/**/
......
......@@ -777,11 +777,11 @@ static int SSL_verify_callback(int ok_return, X509_STORE_CTX *ctx, int unsafe)
char text_sha1[EVP_MAX_MD_SIZE * 3 + 1];
if (getdigest(x509_cert, algo_sha1, text_sha1, sizeof(text_sha1))) {
report(stdout, GT_("%s certificate %s fingerprint: %s\n"), mydata->server_label, algo_sha1, text_sha1);
}
}
}
if (mydata->check_digest != NULL) {
if (strcasecmp(text, mydata->check_digest) == 0) {
if (outlevel > O_NORMAL)
if (outlevel > O_NORMAL)
report(stdout, GT_("%s fingerprints match.\n"), mydata->server_label);
} else {
report(stderr, GT_("%s fingerprints do not match!\n"), mydata->server_label);
......@@ -1056,21 +1056,21 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck
static long ssl_lib_version;
if (!ssl_lib_init) {
#ifndef OSSL110_API
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms(); /* see Debian Bug#576430 and manpage */
#ifndef OSSL110_API
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms(); /* see Debian Bug#576430 and manpage */
ssl_lib_version = SSLeay();
#else
#else
ssl_lib_version = OpenSSL_version_num();
#endif
#endif
ssl_lib_init = 1;
}
if (ssl_lib_version < OPENSSL_VERSION_NUMBER) {
report(stderr, GT_("Loaded OpenSSL library %#lx older than headers %#lx, refusing to work.\n"), (long)ssl_lib_version, (long)(OPENSSL_VERSION_NUMBER));
return -1;
}
return -1;
}
if (ssl_lib_version > OPENSSL_VERSION_NUMBER && outlevel >= O_VERBOSE) {
report(stdout, GT_("Loaded OpenSSL library %#lx newer than headers %#lx, trying to continue.\n"), (long)ssl_lib_version, (long)(OPENSSL_VERSION_NUMBER));
......@@ -1187,7 +1187,7 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck
_ctx[sock] = NULL;
return(-1);
}
// DEBUG: dump ordered SSL cipher list, client side
if (outlevel >= O_DEBUG) {
const char *tmp;
......@@ -1257,14 +1257,14 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck
free(*remotename);
*remotename = xstrdup(buffer);
}
SSL_use_certificate_file(_ssl_context[sock], mycert, SSL_FILETYPE_PEM);
SSL_use_RSAPrivateKey_file(_ssl_context[sock], mykey, SSL_FILETYPE_PEM);
SSL_use_certificate_file(_ssl_context[sock], mycert, SSL_FILETYPE_PEM);
SSL_use_RSAPrivateKey_file(_ssl_context[sock], mykey, SSL_FILETYPE_PEM);
}
SSL_set_ex_data(_ssl_context[sock], global_mydata_index, &mydata);
int ssle_connect = 0;
if (SSL_set_fd(_ssl_context[sock], sock) == 0
if (SSL_set_fd(_ssl_context[sock], sock) == 0
|| (ssle_connect = SSL_connect(_ssl_context[sock])) < 1) {
int e = errno;
unsigned long ssle_err_from_get_error = SSL_get_error(_ssl_context[sock], ssle_connect);
......
......@@ -8,9 +8,6 @@
6.3.17 release, including the OpenSSL exemption.
*/
/* Have Solaris expose ffs() from strings.h: */
#define __EXTENSIONS__
#include "fetchmail.h"
/* includes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment