<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="/templates/2k11/rss.xsl" media="screen" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Daniel Lange's blog (Entries tagged as ssl)</title>
    <link>http://daniel-lange.com/</link>
    <description>agrep -pB IT /dev/life</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.6.0 - http://www.s9y.org/</generator>
    <pubDate>Sat, 03 Nov 2018 19:23:23 GMT</pubDate>

    <image>
    <url>//daniel-lange.com/uploads/Avatar_Blog_144_234.png</url>
    <title>RSS: Daniel Lange's blog - agrep -pB IT /dev/life</title>
    <link>http://daniel-lange.com/</link>
    <width>144</width>
    <height>234</height>
</image>

<item>
    <title>Ahh, the joy of Cloudflare SNI certificates</title>
    <link>http://daniel-lange.com/archives/124-Ahh,-the-joy-of-Cloudflare-SNI-certificates.html</link>
            <category>Internet</category>
    
    <comments>http://daniel-lange.com/archives/124-Ahh,-the-joy-of-Cloudflare-SNI-certificates.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=124</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=124</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;Nice neighbourhood, &lt;a href=&quot;https://www.amsterdam.nl&quot; title=&quot;Home page of the city of Amsterdam, The Netherlands&quot;&gt;https://www.amsterdam.nl&lt;/a&gt;...&lt;/p&gt;

&lt;p&gt;For your copy and paste pleasure:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;openssl s_client &lt;span style=&quot;color: #660033;&quot;&gt;-connect&lt;/span&gt; www.amsterdam.nl:&lt;span style=&quot;color: #000000;&quot;&gt;443&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; openssl x509 &lt;span style=&quot;color: #660033;&quot;&gt;-noout&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-text&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;grep&lt;/span&gt; DNS:&lt;/div&gt;

&lt;p&gt;&lt;!-- s9ymdb:630 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;700&quot; height=&quot;463&quot;  src=&quot;http://daniel-lange.com/uploads/entries/161130_Cloudflare_Amsterdam_nl.png&quot; title=&quot;Screenshot of openssl s_client -connect www.amsterdam.nl:443&quot; alt=&quot;Screenshot of openssl s_client -connect www.amsterdam.nl:443&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Update&lt;/h2&gt;

&lt;p&gt;03.11.18: Cloudflare fixed this mess somewhat. They now look for SNI servernames and use customer-specific certs. See:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;openssl s_client &lt;span style=&quot;color: #660033;&quot;&gt;-servername&lt;/span&gt; www.amsterdam.nl &lt;span style=&quot;color: #660033;&quot;&gt;-connect&lt;/span&gt; www.amsterdam.nl:&lt;span style=&quot;color: #000000;&quot;&gt;443&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; openssl x509 &lt;span style=&quot;color: #660033;&quot;&gt;-noout&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-text&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;grep&lt;/span&gt; DNS:&lt;/div&gt;

&lt;p&gt;(notice the -servername in the above vs. the original command that will fail with something like
&lt;tt&gt;140246838507160:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:769:&lt;/tt&gt; now)&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 30 Nov 2016 07:15:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/124-guid.html</guid>
    <category>cloudflare</category>
<category>dns</category>
<category>sni</category>
<category>ssl</category>
<category>tls</category>

</item>
<item>
    <title>Security is hard, open source security unnecessarily harder</title>
    <link>http://daniel-lange.com/archives/105-Security-is-hard,-open-source-security-unnecessarily-harder.html</link>
            <category>IT</category>
    
    <comments>http://daniel-lange.com/archives/105-Security-is-hard,-open-source-security-unnecessarily-harder.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=105</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=105</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;Now it is a commonplace that security is hard. It involves advanced mathematics and a single, tiny mistake or omission in implementation can &lt;a href=&quot;http://breakingmalware.com/vulnerabilities/one-bit-rule-bypassing-windows-10-protections-using-single-bit/&quot; title=&quot;One-Bit To Rule Them All: Bypassing Windows’ 10 Protections using a single Bit&quot;&gt;spoil everything&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And the only sane IT security can be open source security. Because you need to assess the algorithms and their implementation and you need to be able to completely verify the implementation. You simply can&#039;t if you don&#039;t have the code and can compile it yourself to produce a trusted (ideally &lt;a href=&quot;https://dhole.github.io/post/reproducible_builds_debian_gsoc2015/&quot; title=&quot;Google Summer of Code Project: Debian reproducible builds&quot;&gt;reproducible&lt;/a&gt;) build. A no-brainer for everybody in the field.&lt;/p&gt;

&lt;p&gt;But we make it unbelievably hard for people to use security tools. Because these have grown over decades fostered by highly intelligent people with no interest in &lt;abbr title=&quot;User eXperience, the art of creating a good end user interaction&quot;&gt;UX&lt;/abbr&gt;.&lt;br /&gt;
&quot;It was hard to write, so it should be hard to use as well.&quot;&lt;br /&gt;
And then complain about adoption.&lt;/p&gt;

&lt;p&gt;PGP / gpg has received &lt;a href=&quot;http://www.thoughtcrime.org/blog/gpg-and-me/&quot; title=&quot;Moxie Marlinspike on why gpg is a failure&quot;&gt;quite&lt;/a&gt; &lt;a href=&quot;http://blog.cryptographyengineering.com/2014/08/whats-matter-with-pgp.html&quot; title=&quot;Matthew Green on why gpg is a failure&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;https://www.mailpile.is/blog/2015-02-26_Revisiting_the_GnuPG_discussion.html&quot; title=&quot;Mailpile devs on ... you get the notion, do you?&quot;&gt;fire&lt;/a&gt; this year and the good news is this has resulted in funding for the sole gpg developer. Which will obviously not solve the &lt;abbr title=&quot;User eXperience, the art of creating a good end user interaction&quot;&gt;UX&lt;/abbr&gt; problem.&lt;/p&gt;

&lt;p&gt;But the much worse offender is OpenSSL. It is &lt;strong&gt;so hard to use&lt;/strong&gt; that even experienced hackers fail.&lt;/p&gt;

&lt;p&gt;&lt;!-- s9ymdb:614 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;738&quot; height=&quot;109&quot;  src=&quot;http://daniel-lange.com/uploads/entries/150703_hackint_own_CA.png&quot; title=&quot;Kudos to hexa- for the clear communication.&quot; alt=&quot;IRC wallop on hackint&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, securely encrypting a mass communication media like IRC is not possible at all.
Read &lt;a href=&quot;https://web.archive.org/web/20180620083100/https://www.quakenet.org/articles/99-trust-is-not-transitive-or-why-irc-over-ssl-is-pointless&quot; title=&quot;Quakenet article from 2009&quot;&gt;Trust is not transitive: or why IRC over SSL is pointless&lt;/a&gt;&lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;br /&gt;
Still it makes wiretapping harder and that may be a good thing these days.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.libressl.org/&quot; title=&quot;LibreSSL home page&quot;&gt;LibreSSL&lt;/a&gt; has forked the OpenSSL code base &quot;with goals of modernizing the codebase, improving security, and applying best practice development processes&quot;. No &lt;abbr title=&quot;User eXperience, the art of creating a good end user interaction&quot;&gt;UX&lt;/abbr&gt; improvement. A cleaner code for the chosen few. Duh.&lt;/p&gt;

&lt;p&gt;I predict the re-implementations and gradual improvement scenarios will fail. The nearly-impossible-to-use-right situation with both gpg and (much more importantly) OpenSSL cannot be fixed by gradual improvements and however thorough code reviews.&lt;/p&gt;

&lt;p&gt;Now the &quot;there&#039;s an App for this&quot; security movement won&#039;t work out on a grand scale either:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Most often not open source. Notable exceptions: &lt;a href=&quot;https://github.com/chatsecure&quot; title=&quot;Chatsecure github repository&quot;&gt;ChatSecure&lt;/a&gt;, &lt;a href=&quot;https://github.com/whispersystems/&quot; title=&quot;TextSecure github repositories&quot;&gt;TextSecure&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No reference implementations with excellent test servers and well documented test suites but products. &quot;Use my App.&quot;, &quot;No, use MY App!!!&quot;.&lt;/li&gt;
&lt;li&gt;Only secures chat or email. So the &lt;abbr title=&quot;Venture Capital, rich people&#039;s money to burn in Stanford grad founded startups&quot;&gt;VC&lt;/abbr&gt;-powered (&quot;next WhatsApp&quot;) mass-adoption markets but not the really interesting things to improve upon (&lt;abbr title=&quot;Certificate Authority, the thing you need to manage trust in X.509 certificates&quot;&gt;CA&lt;/abbr&gt;, code signing, &lt;abbr title=&quot;Full Disk Encryption&quot;&gt;FDE&lt;/abbr&gt;, ...).&lt;/li&gt;
&lt;li&gt;While everybody is focusing on mobile adoption the heavy lifting is still on servers. We need sane libraries and APIs. No App for that.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So we need a new development, a new code, a new open source product. Sadly so the &lt;a href=&quot;http://www.linuxfoundation.org/programs/core-infrastructure-initiative&quot; title=&quot;Linux Foundation&#039;s Core Infrastructure Initiative home page&quot;&gt;Core Infrastructure Initiative&lt;/a&gt; so far only funds existing open source projects in dire needs and people bug hunting.&lt;/p&gt;

&lt;p&gt;It basically makes the bad solutions of today a bit more secure and ensures maintenance of decade old crufty code bases. That way it extends the suffering of everybody using the inadequate solutions of today.&lt;/p&gt;

&lt;p&gt;That&#039;s inevitable until we have a better stack but we need to look into getting rid of gpg and OpenSSL and replacing it with something new. Something designed well from the ground up, technically and from a user experience perspective.&lt;/p&gt;

&lt;p&gt;Now who&#039;s in for a five year funding plan? $3m&lt;sup id=&quot;fnref:2&quot;&gt;&lt;a href=&quot;#fn:2&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; annually. &lt;abbr title=&quot;Return on Capital Employed&quot;&gt;ROCE&lt;/abbr&gt; 0. But a very good chance to get the &lt;abbr title=&quot;Order of the British Empire&quot;&gt;OBE&lt;/abbr&gt; awarded.&lt;/p&gt;

&lt;p&gt;&lt;!-- s9ymdb:615 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;430&quot; height=&quot;600&quot;  src=&quot;http://daniel-lange.com/uploads/entries/keep-calm-and-enjoy-the-silence.png&quot; title=&quot;Surprise me!&quot; alt=&quot;Keep calm and enjoy the silence&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;Updates:&lt;/h3&gt;

&lt;p&gt;10.06.22:
Carl Tashian made a &lt;a href=&quot;https://smallstep.com/blog/if-openssl-were-a-gui/&quot;&gt;GUI mockup&lt;/a&gt; to show the complexity of the OpenSSL &quot;user interface&quot;.&lt;/p&gt;

&lt;p&gt;21.07.19:
A current essay on &lt;a href=&quot;https://latacora.micro.blog/2019/07/16/the-pgp-problem.html&quot;&gt;&quot;The PGP problem&quot;&lt;/a&gt; is making rounds and lists some valid issues with the file format, RFCs and the gpg implementation. The GnuPG-users mailing list has a &lt;a href=&quot;https://lists.gnupg.org/pipermail/gnupg-users/2019-July/thread.html#62396&quot;&gt;discussion thread&lt;/a&gt; on the issues listed in the essay.&lt;/p&gt;

&lt;p&gt;19.01.19:
Daniel Kahn Gillmor, a Senior Staff Technologist at the ACLU, tried to get his gpg key transition correct. He put a huge amount of thought and preparation into the transition. To support Autocrypt (another try to get GPG usable for more people than a small technical elite), he specifically created &lt;a href=&quot;https://web.archive.org/web/20190118070041/https://dkg.fifthhorseman.net/blog/2019-dkg-openpgp-transition.html&quot;&gt;different identities for him as a person and his two main email addresses&lt;/a&gt;. Two days later he has to invalidate his new gpg key and back-off to less &quot;modern&quot; identity layouts because many of the brittle pieces of infrastructure around gpg from emacs to gpg signature management frontends to mailing list managers &lt;a href=&quot;https://dkg.fifthhorseman.net/blog/2019-dkg-openpgp-transition.html&quot;&gt;fell over dead&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;28.11.18:
Changed the Quakenet link on why encrypting IRC is useless to an archive.org one as they have removed the original content.&lt;/p&gt;

&lt;p&gt;13.03.17:
Chris Wellons writes about &lt;a href=&quot;http://nullprogram.com/blog/2017/03/12/&quot;&gt;why GPG is a failure&lt;/a&gt; and created a small portable application &lt;a href=&quot;https://github.com/skeeto/enchive&quot;&gt;Enchive&lt;/a&gt; to replace it for asymmetric encryption.&lt;/p&gt;

&lt;p&gt;24.02.17:
Stefan Marsiske has written a &lt;a href=&quot;https://www.ctrlc.hu/~stef/blog/posts/on_pgp.html&quot;&gt;blog article: On PGP&lt;/a&gt;. He argues about adversary models and when gpg is &quot;probably&quot; &lt;sup id=&quot;fnref:3&quot;&gt;&lt;a href=&quot;#fn:3&quot; rel=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt; still good enough to use. To me a security tool can never be a sane choice if the UI is so convoluted that only a chosen few stand at least a chance of using it correctly. Doesn&#039;t matter who or what your adversary is.&lt;br /&gt;
Stefan concludes his blog article:&lt;/p&gt;

&lt;blockquote&gt;
PGP for encryption as in &lt;a href=&quot;https://www.ietf.org/rfc/rfc4880.txt&quot; title=&quot;RFC 4880 OpenPGP Message Format&quot;&gt;RFC 4880&lt;/a&gt; should be retired, some sunk-cost-biases to be coped with, but we all should rejoice that the last 3-4 years had so much innovation in this field, that RFC 4880 is being rewritten&lt;sup&gt;&lt;a href=&quot;https://xkcd.com/285/&quot; title=&quot;Citation needed: Stefan does not provide any verification for this claim&quot;&gt;[Citation needed]&lt;/a&gt;&lt;/sup&gt; with many of the above in mind and that hopefully there&#039;ll be more and better tools. [..]&lt;/blockquote&gt;

&lt;p&gt;He gives an extensive list of tools he considers worth watching in his article. Go and check whether something in there looks like a possible replacement for gpg to you. Stefan also gave a talk on the OpenPGP conference 2016 with similar content, &lt;a href=&quot;https://openpgp-conf.org/2016/openpgp-2016-a-few-concerns.pdf&quot; title=&quot;OpenPGP conference 2016, talk slides by Stefan Marsiske&quot;&gt;slides&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;14.02.17:
James Stanley has written up a &lt;a href=&quot;http://incoherency.co.uk/blog/stories/gpg.html&quot;&gt;nice account&lt;/a&gt; of his two hour venture to get encrypted email set up. The process is speckled with bugs and inconsistent nomenclature capable of confusing even a technically inclined person. There has been no progress in the last ~two years since I wrote this piece. We&#039;re all still riding dead horses. James summarizes:&lt;/p&gt;

&lt;blockquote&gt;Encrypted email is nothing new (PGP was initially released in 1991 - 26 years ago!), but it still has a huge barrier to entry for anyone who isn&#039;t already familiar with how to use it.&lt;/blockquote&gt;

&lt;p&gt;04.09.16:
Greg Kroah-Hartman ends an &lt;a href=&quot;https://plus.google.com/+gregkroahhartman/posts/N2eFYMyAM9r&quot;&gt;analysis of the Evil32 PGP keyid collisions&lt;/a&gt; with:&lt;/p&gt;

&lt;blockquote&gt;gpg really is horrible to use and almost impossible to use correctly.&lt;/blockquote&gt;

&lt;p&gt;14.11.15:&lt;br /&gt;
Scott Ruoti, Jeff Andersen, Daniel Zappala and Kent Seamons of BYU, Utah, have &lt;a href=&quot;http://arxiv.org/pdf/1510.08555.pdf&quot; title=&quot;PDF of Why Johnny Still, Still Can’t Encrypt: Evaluating the Usability of a Modern PGP Client on arXiv&quot;&gt;analysed the usability&lt;/a&gt; [&lt;a href=&quot;http://daniel-lange.com/documents/Ruoti_Andersen_Zappala_Seamons_Usability_Mailvelope_arxiv_1510.08555.pdf&quot; title=&quot;local mirror of the ArXiv paper, 173kB download&quot;&gt;local mirror, 173kB&lt;/a&gt;] of &lt;a href=&quot;https://www.mailvelope.com&quot; title=&quot;Mailvelope home page&quot;&gt;Mailvelope&lt;/a&gt;, a webmail PGP/GPG add-on based on a Javascript PGP implementation. They describe the results as &quot;disheartening&quot;:&lt;/p&gt;

&lt;blockquote&gt;
In our study of 20 participants,  grouped into 10 pairs  of  participants  who  attempted  to  exchange  encrypted
email,  only one pair was able to successfully complete the assigned tasks using Mailvelope.  All other participants were
unable to complete the assigned task in the one hour allotted to the study.  Even though a decade has passed since the last
formal study of PGP, our results show that Johnny has still not gotten any closer to encrypt his email using PGP.
&lt;/blockquote&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr /&gt;
&lt;ol&gt;

&lt;li id=&quot;fn:1&quot;&gt;
&lt;p&gt;Quakenet has removed that article citing &quot;near constant misrepresentation of the presented argument&quot; sometime in 2018. The contents (not misrepresented) are still valid so I have added and archive.org Wayback machine link instead.&amp;#160;&lt;a href=&quot;#fnref:1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn:2&quot;&gt;
&lt;p&gt;The estimate was $2m until end of 2018. The longer we wait, the more expensive it&#039;ll get. And - obviously - ever harder. E.g. nobody needed to care about sidechannel attacks on &lt;a href=&quot;https://en.wikipedia.org/wiki/ARM_big.LITTLE&quot;&gt;big-LITTLE&lt;/a&gt; five years ago. But now they start to hit servers and security-sensitive edge devices.&amp;#160;&lt;a href=&quot;#fnref:2&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn:3&quot;&gt;
&lt;p&gt;Stefan says &quot;probably&quot; &lt;strong&gt;five&lt;/strong&gt; times in one paragraph. Probably needs an editor. The person not the application.&amp;#160;&lt;a href=&quot;#fnref:3&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
 
    </content:encoded>

    <pubDate>Fri, 03 Jul 2015 07:42:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/105-guid.html</guid>
    <category>gpg</category>
<category>gpp</category>
<category>irc</category>
<category>opensource</category>
<category>openssl</category>
<category>security</category>
<category>ssl</category>
<category>updated</category>

</item>
<item>
    <title>Multiple Apache VHosts on the same IP and port</title>
    <link>http://daniel-lange.com/archives/2-Multiple-Apache-VHosts-on-the-same-IP-and-port.html</link>
            <category>Apache</category>
    
    <comments>http://daniel-lange.com/archives/2-Multiple-Apache-VHosts-on-the-same-IP-and-port.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=2</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=2</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;I just learned yesterday again, what I knew a few years ago, but since had forgotten:&lt;/p&gt;

&lt;p&gt;You cannot put multiple SSL-enabled virtual Apache hosts onto the same IP and port.&lt;/p&gt;

&lt;p&gt;Apache cannot identify which VirtualHost to serve a request from because the payload is encrypted in its entirety. So a&lt;/p&gt;

&lt;pre&gt;Host: servertwo.tld&lt;/pre&gt;

&lt;p&gt;header cannot be parsed until the encryption has been removed. Which requires the key, which is listed in the VHost section that could not be identified in the first place...
So a name-based VirtualHost-configuration like this won&#039;t work:&lt;/p&gt;

&lt;div class=&quot;apache geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;Listen&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;NameVirtualHost&lt;/span&gt; *:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLEngine&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;On&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;ServerName&lt;/span&gt; serverone.tld:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateFile&lt;/span&gt; /etc/apache2/ssl/serverone.crt&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateKeyFile&lt;/span&gt; /etc/apache2/ssl/serverone.key&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;[...]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLEngine&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;On&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;ServerName&lt;/span&gt; servertwo.tld:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateFile&lt;/span&gt; /etc/apache2/ssl/servertwo.crt&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateKeyFile&lt;/span&gt; /etc/apache2/ssl/servertwo.key&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;[...]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;

&lt;p&gt;It will just serve any request out of the first VirtualHost (serverone.tld) regardless of the hostname in the request headers.&lt;/p&gt;

&lt;p&gt;There is some light at the end of this tunnel though:
&lt;a target=&quot;_blank&quot; title=&quot;RFC 4366&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt; describes an optional field to the TLS (&lt;a target=&quot;_blank&quot; title=&quot;Wikipedia:Transport Layer Security - TLS&quot; href=&quot;http://en.wikipedia.org/wiki/Transport_Layer_Security&quot;&gt;Transport Layer Security&lt;/a&gt;) client request called &amp;quot;Server Name Indication&amp;quot; (SNI). With this the client just includes a list of ServerNames (usually one) that it&#039;s trying to contact. Apache can easily match the supplied name from the client against a ServerName (or ServerAlias) directive from it&#039;s configuration files.&lt;/p&gt;

&lt;p&gt;SNI will be supported with &lt;a target=&quot;_blank&quot; title=&quot;OpenSSL Homepage&quot; href=&quot;http://openssl.org&quot;&gt;OpenSSL&lt;/a&gt; v0.9.9 in mod_ssl. Sometime in the future. There is a backport to v0.9.8 available from Steven Henson linked &lt;a target=&quot;_blank&quot; title=&quot;Blog Entry: Mozillazine - gerv&quot; href=&quot;http://weblogs.mozillazine.org/gerv/archives/2007/08/virtual_hosting_ssl_and_sni.html&quot;&gt;here&lt;/a&gt;. Or you can use mod_gnutls as described by George Notaras in a recent &lt;a target=&quot;_blank&quot; title=&quot;Blog entry: SSL-enabled Name-based Apache Virtual Hosts with mod_gnutls&quot; href=&quot;http://www.g-loaded.eu/2007/08/10/ssl-enabled-name-based-apache-virtual-hosts-with-mod_gnutls/&quot;&gt;blog entry&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In either cases the above configuration snippet will &amp;quot;just work&amp;quot; once SNI is understood by Apache.&lt;/p&gt;

&lt;p&gt;Currently Internet Explorer 7 (on Vista only, wanna upgrade &lt;img src=&quot;http://daniel-lange.com/plugins/serendipity_event_emoticate/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;), Mozilla Firefox 2+, Opera 7.6+, KDE Konqueror 3.5+ support sending the SNI. You can test your browser at Kaspar Brand&#039;s &lt;a target=&quot;_blank&quot; title=&quot;https://sni.velox.ch/&quot; href=&quot;https://sni.velox.ch/&quot;&gt;SNI testpage&lt;/a&gt;. He also has a patch available to make Apache 2.2 mod_ssl SNI capable when compiled against a CVS-version of OpenSSL.&lt;/p&gt;

&lt;p&gt;I&#039;m rather sure that spreading SNI capable hosts will also provide new hacking opportunities:
Let&#039;s assume a system serves both Intranet and Internet traffic. A client contacts the Internet IP with SSL but specifies the Intranet Hostname in it&#039;s TLS SNI entry. Guess what will happen? Yup.&lt;/p&gt;

&lt;h2&gt;Update&lt;/h2&gt;

&lt;p&gt;02.09.2009: Gee, after two years people still read this blog entry. So I&#039;ll point you to a few updates. 2009 is not 2007 &lt;img src=&quot;http://daniel-lange.com/plugins/serendipity_event_emoticate/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt; SNI has made some slow progress since the original article. But major steps forward only came this summer: Apache has official support for SNI since 2.2.12 (&lt;a href=&quot;https://issues.apache.org/bugzilla/show_bug.cgi?id=34607&quot; title=&quot;Apache bugtracker bug 34607 - Support for Server Name Indication&quot;&gt;tracking bug&lt;/a&gt;). Gentoo has been early to support SNI and &lt;a href=&quot;http://dev.gentoo.org/~dertobi123/&quot; title=&quot;Tobias&#039; Gentoo dev page&quot;&gt;Tobias Scheerbaum&lt;/a&gt; has written a blog entry on &lt;a href=&quot;http://blog.scherbaum.info/2008/07/20/apache-ssl-und-sni/&quot; title=&quot;Tobias Scheerbaum&#039;s blog entry (in GERMAN)&quot;&gt;Apache, SSL und SNI in Gentoo (in German)&lt;/a&gt; summarizing how it works out of the box. Support for SNI has also been added to Debian (&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461917&quot; title=&quot;Debian bugtracker bug 461917 - Apache 2.2 TLS-SNI support,Package: apache2&quot;&gt;tracking bug&lt;/a&gt;) but for now the default config files don&#039;t reflect SNI capability yet. Ubuntu will see SNI in Karmic Koala, the release scheduled for next month i.e. &quot;9.10&quot; (&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/184131&quot; title=&quot;Ubuntu bugtracker bug 184131 - Apache 2.2 SNI support&quot;&gt;tracking bug&lt;/a&gt;). Fedora has a SNI enabled Apache from httpd-2.2.13-1.fc11 onwards (&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=443513&quot; title=&quot;Red Hat bugtracker bug 443513 - SNI support for mod_ssl&quot;&gt;tracking bug&lt;/a&gt;). Tobias also states that SP3 for Windows XP enables IE6 to send the SNI (SP2 is not sufficient).&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 13 Oct 2007 12:00:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/2-guid.html</guid>
    <category>apache</category>
<category>sni</category>
<category>ssl</category>
<category>updated</category>
<category>virtualhost</category>

</item>

</channel>
</rss>
