{"id":179,"date":"2009-01-13T22:46:16","date_gmt":"2009-01-14T06:46:16","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=179"},"modified":"2010-02-24T08:38:00","modified_gmt":"2010-02-24T16:38:00","slug":"etoomanycerts","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2009\/01\/13\/etoomanycerts\/","title":{"rendered":"ETOOMANYCERTS"},"content":{"rendered":"<p>After upgrading an Ubuntu mail server from Hardy to Intrepid, two users could no longer connect via SSL to send email though <code>sendmail<\/code>.  One was using <code>msmtp<\/code> and the other was using Outlook Express.  The <code>msmtp<\/code> issue was <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/gnutls13\/+bug\/292604\">tracked down<\/a> as a supposed deficiency in msmtp.  However, this left Outlook, which is neigh-impossible to debug.  From the <a href=\"http:\/\/bugs.debian.org\/cgi-bin\/bugreport.cgi?bug=478191\">Debian <code>msmtp<\/code> bug<\/a> linked from the Ubuntu bug, it seemed that the root cause was the server sending too much data during the initial connection.  Packet captures of an Outlook connection seemed to back this up: Outlook negotiated STARTTLS fine, and then just never responded to the SSL handshake.<\/p>\n<p>It seems that something (<code>openssl<\/code>? <code>sendmail<\/code>?) changed between Hardy and Intrepid so that instead of using the \/etc\/ssl\/certs\/ca-certificates.crt file just for verification, its contents were now being sent during the SSL handshake.  (I reduced the number of configured certs with &#8220;<code>sudo dpkg-reconfigure ca-certificates<\/code>&#8220;, and checked on the size of the handshake with &#8220;<code>openssl s_client -connect server:port | wc -l<\/code>&#8220;.)  It spewed 143 certs sent at every connection.  Unsurprisingly, it seems some clients were choking on it (I would like to note that Thunderbird behaved correctly).<\/p>\n<p>In the end, I configured my sendmail&#8217;s CAfile (&#8220;confCACERT&#8221;) to aim at just a single CA (the CA used to sign the server&#8217;s SSL key), and that fixed both msmtp and Outlook.  How fun.<\/p>\n<p style='text-align:left'>&copy; 2009 &#8211; 2010, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>After upgrading an Ubuntu mail server from Hardy to Intrepid, two users could no longer connect via SSL to send email though sendmail. One was using msmtp and the other was using Outlook Express. The msmtp issue was tracked down as a supposed deficiency in msmtp. However, this left Outlook, which is neigh-impossible to debug. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,7,14,19],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/179"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":1,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/179\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}