summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-20Added tls_dh_max_bits & check tls_require_ciphers early.Phil Pennock
Janne Snabb tracked down the GnuTLS 2.12 vs NSS (Thunderbird) interop problems to a hard-coded limit of 2236 bits for DH in NSS while GnuTLS was suggesting 2432 bits as normal. Added new global option tls_dh_max_bits to clamp all DH values (client or server); unexpanded integer. Default value to 2236. Apply to both GnuTLS and OpenSSL (which requires tls_dh_params for this). Tired of debugging "SMTP fails TLS" error messages in mailing-lists caused by OpenSSL library/include clashes, and of finding out I typo'd in tls_require_ciphers only at the STARTTLS handshake. During readconf, fork/drop-privs/initialise-TLS-library. In that, if tls_require_ciphers is set, then validate it. The validation child will panic if it can't initialise or if tls_require_ciphers can't be parsed, else it exits 0. If the child exits anything other than 0, the main Exim process will exit.
2012-05-20Guard TLS SNI callback define better.Phil Pennock
Guarded the callback invocation on OpenSSL having TLS extension support. Failed to guard the callback definition. Fixed. Problem spotted by Todd Lyons.
2012-05-20tls_require_ciphers must be assigned to state copyPhil Pennock
2012-05-20Merge branch 'master_testsuite_faq'Todd Lyons
2012-05-20FAQ of running test suiteTodd Lyons
2012-05-20Testsuite: more guidance in READMEJeremy Harris
2012-05-20Typo: PRE_PRERELEASE -> PCRE_PRERELEASEPhil Pennock
Noted by Moritz Wilhelmy.
2012-05-20GnuTLS debug callback: check for existing \nPhil Pennock
2012-05-20"make makfile" -> "make makefile".Phil Pennock
Confirmed typo, rather than QNXism, by grepping tree and finding no other instances. Reported by René Berber.
2012-05-19Cipher munging continues.Phil Pennock
I omitted log/2025 pending further investigation.
2012-05-19HAVE_IPV6=yes in comment; need value!Phil Pennock
2012-05-20Testsuite: munge recorded TLS version &c in output to permit awkward ↵Jeremy Harris
test-host installations.
2012-05-19PRINTF_FUNCTION -> ALMOST_PRINTF.Phil Pennock
WANT_DEEPER_PRINTF_CHECKS guards ALMOST_PRINTF being PRINTF_FUNCTION. Fix some actual issues exposed when I cut down on the spam.
2012-05-19Portability to HP-UX.Phil Pennock
Report and fix from Michael Haardt. The resolver library change's assumed typedef was absent, but the underlying struct __res_state is present. Long type issues for the arithmetic changes.
2012-05-19PCRE_PRERELEASE fix, againPhil Pennock
2012-05-18Torture the English language slightly lessexim-4_80_RC2Phil Pennock
2012-05-18Fix three issues highlighted by clang analyser.Phil Pennock
Only crash-plausible issue would require the Cambridge-specific iplookup router and a misconfiguration. Report from Marcin Mirosław
2012-05-18Test suite fixes, mostly for new certs.Phil Pennock
New cert1 and cert2 but I'd only updated the GnuTLS tests. This fixes OpenSSL ones too. The SHELL vs /bin/sh one also fixed, finally realised that the test output just hadn't been updated to match the munging.
2012-05-18Document DCC in experimental-spec.txtPhil Pennock
Base text from Wolfgang Breyha. I went over it as someone new to it, to make some obvious-to-experts-but-not-me fixes.
2012-05-18Second SPF fix, moved to where type is correct.Phil Pennock
De-initialised "type" var in stack declaration, so a repeat of this mistake would lead to an uninitialized variable usage warning which would have blocked the previous incorrect fix from being committed.
2012-05-18Fix dcc_header content corruption.Phil Pennock
(stack memory referenced, read-only, out of scope). Patch from Wolfgang Breyha, report from Stuart Northfield.
2012-05-18SPF multiple strings join on "".Phil Pennock
Patch from Janne Snabb.
2012-05-17GnuTLS pretty much passes test suite.exim-4_80_RC1Phil Pennock
Fixed assumption that tls_certificate non-NULL in server when TLS advertised. Weakened an !S_ISREG() to an S_ISDIR() to keep the test-suite happy. Using: do { rc = gnutls_handshake(state->session); } while ((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)); is contra-indicated when you expect SIGALRM to be able to break you out of the loop. A little _too_ robust there. Switching last part to: (rc == GNUTLS_E_INTERRUPTED && !sigalrm_seen) is rather more productive. Only test not passing is 2025, which makes major assumptions about cipher suites and needs to be revisited to see what it's trying to achieve. We fail the test because we successfully deliver the message without expected errors, because other ciphersuites are available, since we're no longer limited to a *very* short list embedded in the Exim code. That sort of failure I can live with.
2012-05-17Make test-suite client cmd -t<timeout> actually workPhil Pennock
2012-05-17CRL addition returns count of CRLs addedPhil Pennock
A couple more cert1/2 strings updated, plus some disambiguating rhubarb.
2012-05-17Insert new JH/02 entry for the ACL clean-upPhil Pennock
2012-05-18Documentation update for bug 1172.root
2012-05-17Support expansion variable for hi-res timestamp (bug 1172).Jeremy Harris
2012-05-17fix tls_cipher memory lifetime.Phil Pennock
Some tests had not been updated for the new cert because they were missing an X= log-line. Updated those tests now.
2012-05-17More GnuTLS cleanups/fixes.Phil Pennock
Decided "unknown (reason)" in tls_peerdn was wrong, stripped that, added replacement guard. Moved cipherbuf construction to where it makes more sense, where peerdn is extracted, so that setting the exim vars gets back closer to just some pointer switching. Fix missing failure check after handshake in client. Fix tls.c tls_ungetc() and friends by pointing watermark vars at state content. Regenerated test-suite D-H params so we don't have too small values, which was causing connection rejections. Test-suite output where new test cert info is logged (there will be a couple more, when I fix a lingering problem with tls_peerdn being unset in client log-lines). Give test-suite client command some --help.
2012-05-17GnuTLS control constants exposed to Makefile.Phil Pennock
Mostly care about EXIM_GNUTLS_LIBRARY_LOG_LEVEL for debugging. If someone screams that we kept the default dh-bits at 1024 for old GnuTLS, we can point them at EXIM_SERVER_DH_BITS_PRE2_12. The name itself will tell them to shut up and update their library if they care about security. :)
2012-05-17Copyright year updates.Phil Pennock
Updated all files modified in 2012 which contained a copyright year already, unless the range was specified as open-ended. vi $(git whatchanged --since=2012-01-01 | grep '^:100' | sed 's/^[^M]*M//' | sort -u | fgrep -v test/)
2012-05-17gnutls_require_protocols comment on 4.77 notes.Phil Pennock
2012-05-174.78 -> 4.80Phil Pennock
2012-05-17Handle absent tls_require_ciphers correctly.Phil Pennock
Fix test-suite certs to not use MD5. Document that we do not support MD5 certs any longer. Make test-suite generate probably-correct gnutls-params filename for us.
2012-05-17Handle TLSv1.2 in test suite.Phil Pennock
Normalise TLSv1.2 to TLSv1. Normalise AES256-GCM-SHA384 to AES256-SHA. Make some test configs accept AES256-GCM-SHA384 in "encrypted =" ACLs. Have test suite print final test id during abort, make it easier to track down.
2012-05-17Get TLS SNI server-switching working with GnuTLS.Phil Pennock
Registering a cert/key in an x509 credentials *adds* them, and there's no way to remove them, so we need a shiny new x509_cred each time the key/cert change. Since we avoid re-expanding unless tls_sni appears in tls_certificate, we've mostly avoided the expense unless SNI is in use, and the extra loading should be minimal, as everything should be in buffer/cache from a few microseconds beforehand. This code tested with GnuTLS and OpenSSL clients, without TLS extensions, with servername, and verifying we do now get the correct cert.
2012-05-17fix TLS SNI segfault casePhil Pennock
Failed to notice my test config on the GnuTLS box did nothing with SNI. Fixed segfault. Better diagnostics. Still not actually changing key/cert, need to investigate further
2012-05-17Guards for older releases of GnuTLS.Phil Pennock
gnutls_sec_param_to_pk_bits() and gnutls_rnd() are both new as of GnuTLS 2.12.x. Guard their usage on 2.12.0+ at compile time. In older versions, the vaguely_random_number() function just immediately calls the fallback, so it's the same as before this change (just one extra indirection in the code-path). Define a constant of 1024 for dh-bits for use in those old releases where GnuTLS won't tell us how many we should use. Change the on-disk filename for generated D-H params again, replacing the -normal with -<bitcount>, so that it's 1024 or whatever, and as the value changes, Exim will automatically start using the new value.
2012-05-17dnsdb SPF support, from Janne SnabbPhil Pennock
2012-05-16Merge branch 'experimental_ocsp'Phil Pennock
2012-05-16Overhaul of GnuTLS code.Phil Pennock
GnuTLS code re-done, using cut&paste for preservation where appropriate. Stop using deprecated APIs. Stop hard-coding lists of ciphers. Use gnutls_priority_init() instead. Turns tls_require_ciphers into a string in the GnuTLS case, not just OpenSSL case. Deprecate three gnutls_require_* options; now ignored but not errors. (No warnings yet). Added TLS SNI support. Made the channel binding integration theoretically actually work. I had it guarded by an #ifdef but the value used was an enum instead. Oops. Fixed. New code much more amenable to future work permitting TLS in callouts. DH param sizes now chosen by GnuTLS maintainers, we use "normal"; that's suddenly a lot more bits, so the saved filename was changed too. (GNUTLS_SEC_PARAM_NORMAL). DH param setup only done for servers now, since clients don't need/use it. GnuTLS a lot more robust to library negotiation using stuff we don't support, error-ing out quickly for other authentication systems (PGP, etc). Renamed pseudo_random_number() to vaguely_random_number() which makes the nature clearer. GnuTLS now provides a vaguely_random_number() implementation, to match OpenSSL. Pull in <inttypes.h> to make the recent arithmetic changes compile on MacOS. Nuke test 2011 which related to the gnutls_require_* options now non-functional.
2012-05-15Testsuite: fix problem with parsing retry records spanning midnight.Jeremy Harris
2012-05-13Merge branch '64bitint'Jeremy Harris
2012-05-13Use defines in config.h for type & scanf-patterns for eval. Update docs.Jeremy Harris
2012-05-13typo fixPhil Pennock
2012-05-13Make integer values 64bit (bug 1171).Jeremy Harris
2012-05-13Testsuite: ensure socket from wait-mode daemon test is not held open.Jeremy Harris
2012-05-13Oops, missed .c change in bug 1246 fix git commitPhil Pennock
2012-05-13Fixed headers_only on smtp transports.Phil Pennock
Was not sending trailing dot. Added test case to catch this. fixes bug 1246.