<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>langui.sh &#187; sni</title>
	<atom:link href="http://langui.sh/tag/sni/feed/" rel="self" type="application/rss+xml" />
	<link>http://langui.sh</link>
	<description>Fun hacks, WP plugins, photography, and PKI junk.  Languishing since 2008.</description>
	<lastBuildDate>Sat, 19 May 2012 01:42:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>SNI Support in Chromium OS X</title>
		<link>http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/</link>
		<comments>http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 01:16:59 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[sni]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1111</guid>
		<description><![CDATA[<a href="http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/" title="SNI Support in Chromium OS X"></a>As of r39934 Chromium now supports the server_name TLS extension (server name indication) in OS X (latest build). This support requires OS X 10.5.7 or later. Hopefully it&#8217;ll make its way into a dev/beta/stable release of Google Chrome itself soon. &#8230;<p class="read-more"><a href="http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/" title="SNI Support in Chromium OS X"></a><p>As of <a href="http://src.chromium.org/viewvc/chrome?view=rev&#038;revision=39934" target="_blank">r39934</a> Chromium now supports the server_name TLS extension (server name indication) in OS X (<a href="http://build.chromium.org/buildbot/continuous/mac/LATEST/" target="_blank">latest build</a>).  This support requires OS X 10.5.7 or later.  Hopefully it&#8217;ll make its way into a dev/beta/stable release of Google Chrome itself soon.</p>
<p>For those who are more curious than they ought to be about how I wrote this patch&#8230; Apple added support in their Secure Transport library for the server_name TLS extension, but has not updated their <a href="http://developer.apple.com/mac/library/DOCUMENTATION/Security/Reference/secureTransportRef/Reference/reference.html" target="_blank">documentation</a>.  As of 10.5.7 (or possibly 10.5.6) the SSLSetPeerDomainName function &#8212; which is ostensibly used for OS level certificate verification &#8212; causes OS X to send the server_name extension in the TLS client hello.  However, since Chromium doesn&#8217;t use OS X&#8217;s built-in verification it wasn&#8217;t passing this data through prior to the patch.</p>
<p>To test you can hit up my IDN SNI site <a href="https://☣.ws/" target="_blank">https://☣.ws/</a> or <a href="https://alice.sni.velox.ch/" target="_blank">https://alice.sni.velox.ch/</a>. The former will throw a certificate error if you are on a non-SNI enabled browser and the latter will have text stating that the SNI extension is missing.</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2010/02/24/sni-support-in-chromium-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL VHosting On The Same IP (aka SNI)</title>
		<link>http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/</link>
		<comments>http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:01:54 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sni]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=747</guid>
		<description><![CDATA[<a href="http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/" title="SSL VHosting On The Same IP (aka SNI)"></a>Server Name Indication (SNI), an extension to TLS, allows browsers that support it to connect to SSL hosts that do not have dedicated IPs (much like standard http virtual hosting has worked for years). This extension, however, must be supported &#8230;<p class="read-more"><a href="http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/" title="SSL VHosting On The Same IP (aka SNI)"></a><p>Server Name Indication (SNI), an extension to TLS, allows browsers that support it to connect to SSL hosts that do not have dedicated IPs (much like standard http virtual hosting has worked for years).  This extension, however, must be supported on both the server and client side.  Microsoft has not yet chosen to support it (maybe IIS 8?), but the Apache project did with the 2.2.12 release.  Recently, Ubuntu 9.10 Server became the first server distribution to ship with Apache and OpenSSL built with the appropriate flags, so if you&#8217;d like to follow along you can use a 9.10 VM.</p>
<p>In the ideal case everything is the same as a regular vhost, but you&#8217;ll first need to enable SSL.  On Ubuntu this requires you to run <b>a2enmod</b> and type &#8220;ssl&#8221;.  After that you&#8217;ll need to add</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">NameVirtualHost</span> *:<span style="color: #ff0000;">443</span></pre></div></div>

<p>to the root conf, then make your VirtualHost much like a normal one.  A very basic pair of vhosts is seen below.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">443</span>&gt;
	<span style="color: #00007f;">ServerAdmin</span> webmaster@localhost
&nbsp;
	<span style="color: #00007f;">DocumentRoot</span> /my/doc/root
	<span style="color: #00007f;">ServerName</span> mydomain.com
	<span style="color: #00007f;">SSLEngine</span> <span style="color: #0000ff;">On</span>
	<span style="color: #00007f;">SSLCertificateFile</span> /path/to/domain.crt 
	<span style="color: #00007f;">SSLCertificateKeyFile</span> /path/to/domain.key
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">443</span>&gt;
	<span style="color: #00007f;">ServerAdmin</span> webmaster@localhost
&nbsp;
	<span style="color: #00007f;">DocumentRoot</span> /my/doc/root
	<span style="color: #00007f;">ServerName</span> mydomain2.com
	<span style="color: #00007f;">SSLEngine</span> <span style="color: #0000ff;">On</span>
	<span style="color: #00007f;">SSLCertificateFile</span> /path/to/domain2.crt 
	<span style="color: #00007f;">SSLCertificateKeyFile</span> /path/to/domain2.key
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>These vhosts should be placed in different includes ideally, but it isn&#8217;t required.  If you just want to test with a self-signed certificate you can create one with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-keyout</span> mykey.key <span style="color: #660033;">-out</span> mycert.cer <span style="color: #660033;">-days</span> <span style="color: #000000;">3650</span> <span style="color: #660033;">-x509</span></pre></div></div>

<p>You&#8217;ll need to specify the domain name you want in the &#8220;Common Name&#8221; section.</p>
<p>Once you&#8217;ve got all this done you can restart apache and test it out!  If you test on a browser that doesn&#8217;t support SNI (IE on XP) you&#8217;ll get the SSL cert for the first vhost apache parses.  To disable accessing it on non-SNI hosts you can add</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">SSLStrictSNIVHostCheck <span style="color: #0000ff;">on</span></pre></div></div>

<p>to the root conf.  This will cause a 403 error for those browsers.</p>
<p>If you&#8217;d like to see an example implementation of SNI you can check out my IDN domains <a href="http://xn--j4h.ws">https://☢.ws/</a> and <a href="https://xn--k4h.ws/">https://☣.ws/</a>.  These sites are hosted on the same IP with different SSL certificates.  I have strict host checking turned on so visiting them with a non-SNI capable browser will result in a 403 error.<sup class='footnote'><a href='#fn-747-1' id='fnref-747-1'>1</a></sup></p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-747-1'>See the Wikipedia article about <a href="http://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication</a> for more information on supported browsers. <span class='footnotereverse'><a href='#fnref-747-1'>&#8617;</a></span></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2009/11/03/ssl-vhosting-on-the-same-ip-aka-sni/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 11/15 queries in 0.004 seconds using memcached
Object Caching 516/518 objects using memcached

Served from: langui.sh @ 2012-05-21 13:46:00 -->
