<?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>ssl &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Sun, 12 Jun 2016 02:04:32 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Check Out your IP address (And User-Agent)</title>
		<link>https://luxing.im/check-out-your-ip-address/</link>
					<comments>https://luxing.im/check-out-your-ip-address/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 11 May 2015 12:16:44 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=501</guid>

					<description><![CDATA[I know there are many tell-your-IP-address services available, some even have the whois lookup functionality. I found it was unhelpful when it comes to scripting. I made a website, it has more features which curlmyip.com doesn&#8217;t have. It could report your IP address for a script-friendly way (direct response). It supports ipv4, ipv6 and SSL &#8230; <p class="link-more"><a href="https://luxing.im/check-out-your-ip-address/" class="more-link">Continue reading<span class="screen-reader-text"> "Check Out your IP address (And User-Agent)"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I know there are many tell-your-IP-address services available, some even have the whois lookup functionality. I found it was unhelpful when it comes to scripting. I made a website, it has more features which curlmyip.com doesn&#8217;t have. It could report your IP address for a script-friendly way (direct response). It supports ipv4, ipv6 and SSL access.<br />
<span id="more-501"></span><br />
IP:<br />
<a href="http://ipv4.luxing.im" target="_blank">http://ipv4.luxing.im</a><br />
<a href="http://ipv6.luxing.im" target="_blank">http://ipv6.luxing.im</a><br />
<a href="http://ip.luxing.im" target="_blank">http://ip.luxing.im</a><br />
<a href="https://get.luxing.im/ip" target="_blank">https://get.luxing.im/ip</a></p>
<p>User-Agent:<br />
<a href="http://ua.luxing.im" target="_blank">http://ua.luxing.im</a><br />
<a href="https://ua.luxing.im" target="_blank">https://ua.luxing.im</a><br />
<a href="http://get.luxing.im/ua" target="_blank">http://get.luxing.im/ua</a></p>
<p>When you are using the ua.luxing.im method in cURL, you need to add -L option to follow the link.</p>
<p>If you are using cURL with SSL, you may need to take a look at <a href="https://luxing.im/curl-support-for-cloudflare-enabled-websites/">this</a> article.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/check-out-your-ip-address/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">501</post-id>	</item>
		<item>
		<title>cURL support for CloudFlare-enabled websites</title>
		<link>https://luxing.im/curl-support-for-cloudflare-enabled-websites/</link>
					<comments>https://luxing.im/curl-support-for-cloudflare-enabled-websites/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 06 Apr 2015 12:05:22 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[cipher]]></category>
		<category><![CDATA[cloudflare]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=478</guid>

					<description><![CDATA[CloudFlare provides a nice protection from DDoS and other hacking activities, last year they even added a free UniverSSL package to all users. The problem began with the cURL ciphers on cloudflare-enabled websites. cURL does not successfully handshake with cloudflare servers with its default encryption algorithms. Update: Recent update on cURL and nss libs have &#8230; <p class="link-more"><a href="https://luxing.im/curl-support-for-cloudflare-enabled-websites/" class="more-link">Continue reading<span class="screen-reader-text"> "cURL support for CloudFlare-enabled websites"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>CloudFlare provides a nice protection from DDoS and other hacking activities, last year they even added a free UniverSSL package to all users. The problem began with the cURL ciphers on cloudflare-enabled websites. cURL does not successfully handshake with cloudflare servers with its default encryption algorithms.</p>
<p><strong>Update: Recent update on cURL and nss libs have enabled curl to operate on CloudFlare-enabled web pages without doing anything. Git also works now.</strong></p>
<p><span id="more-478"></span></p>
<p>I test my website out using openssl s_client.</p>
<pre>openssl s_client -connect luxing.im:443</pre>
<p>We could see the following output:<br />
<code><br />
...<br />
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256<br />
Server public key is 2048 bit<br />
Secure Renegotiation IS supported<br />
Compression: NONE<br />
Expansion: NONE<br />
SSL-Session:<br />
    Protocol  : TLSv1.2<br />
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256<br />
...<br />
</code></p>
<p>OK so it is using ECDHE-RSA-AES128-GCM-SHA256 cipher to connect to my website.</p>
<p>Well, let&#8217;s try this:</p>
<pre>curl https://luxing.im --cipher ecdhe_rsa_aes_128_gcm_sha_256</pre>
<p>curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).</p>
<p>Huh. Strange isn&#8217;t it? With a LOT of searching, finally I got an answer from <a href="http://comments.gmane.org/gmane.comp.web.curl.general/14446" target="_blank">here</a>, I added the suggested line to .curlrc in my home directory:</p>
<pre>
 ciphers="rsa_aes_256_sha,rsa_aes_128_sha,dhe_rsa_aes_256_cbc_sha,dhe_rsa_aes_128_cbc_sha,rsa_aes_256_cbc_sha_256,rsa_aes_128_cbc_sha_256,dhe_rsa_aes_256_cbc_sha_256,dhe_rsa_aes_128_cbc_sha_256,rsa_aes_128_gcm_sha_256,ecdhe_rsa_aes_128_gcm_sha_256,ecdhe_ecdsa_aes_128_gcm_sha_256"</pre>
<p>Then try:</p>
<pre>curl -v https://luxing.im</pre>
<p>Yes, now my curl is working. Let&#8217;s see the output:<br />
<code><br />
...<br />
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256<br />
...<br />
</code></p>
<p>OK. It is actually using the TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 algorithm, so forcing the cipher to use ecdhe_ecdsa_aes_128_gcm_sha_256 works.</p>
<p>My curl is:<br />
<code><br />
curl -V<br />
curl 7.37.0 (x86_64-redhat-linux-gnu) libcurl/7.37.0 NSS/3.17.4 Basic ECC zlib/1.2.8 libidn/1.28 libssh2/1.4.3<br />
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp<br />
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz Metalink<br />
</code><br />
And I am on Fedora 20+.</p>
<p>Note:<br />
1. Debian/RHEL/CentOS series does not support this algorithm. You&#8217;ll have to create a ticket to CloudFlare support to discuss it with them.<br />
2. According to <a href="http://stackoverflow.com/questions/13114268/passing-ciphers-to-libcurl-through-git" target="_blank">this</a>, git uses cURL to access https repositories but this workaround won&#8217;t help. Too bad.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/curl-support-for-cloudflare-enabled-websites/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">478</post-id>	</item>
		<item>
		<title>SSL Setup</title>
		<link>https://luxing.im/ssl-setup/</link>
					<comments>https://luxing.im/ssl-setup/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 28 Jul 2014 18:14:19 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=404</guid>

					<description><![CDATA[This is a personal technical note for SSL certificate setup, ensuring better scores at SSL Labs so that we have a better Internet security for our own. I use the built-in script provided from RHEL/CentOS to generate a private key. The location is under /etc/ssl/cert, by typing make site.key It will generate a private key. &#8230; <p class="link-more"><a href="https://luxing.im/ssl-setup/" class="more-link">Continue reading<span class="screen-reader-text"> "SSL Setup"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>This is a personal technical note for SSL certificate setup, ensuring better scores at <a href="https://www.ssllabs.com" target="_blank">SSL Labs</a> so that we have a better Internet security for our own.</p>
<p><span id="more-404"></span></p>
<p>I use the built-in script provided from RHEL/CentOS to generate a private key. The location is under <em>/etc/ssl/cert</em>, by typing</p>
<pre>make site.key</pre>
<p>It will generate a private key. Its actual command is:</p>
<pre>openssl genrsa -aes128 2048 </pre>
<p>You can adjust the key size for your own needs, but at least 2048 is needed for a relatively secure certificate.</p>
<p>Then we make its CSR by typing:</p>
<pre>make site.csr</pre>
<p>The actual command is:</p>
<pre>openssl req -new -key site.key -out site.csr -aes256</pre>
<p>The name <strong>site</strong> must be the same as the key name for the script to work. You can now copy and paste the CSR to whoever your trusted SSL Certificate Provider to sign. It doesn&#8217;t matter who choose to sign it as long as your user and you trust it, therefore I used <a href="https://www.CACert.org" target="_blank">CACert.org</a></p>
<p>Before we do anything else, we need to generate a different DH param. Let&#8217;s cd into /etc/nginx/ssl (or whatever you prefer), and do the following command:</p>
<pre>openssl dhparam -out dhparams.pem 2048</pre>
<p>Now we generate a custom DH param for securer DH. In the configuration next, we will use it.</p>
<p>Next, we need to setup a website that runs on SSL. Choosing the cipher is the most important part that prevents most of the crackers cracking decipher your server&#8217;s communication. The httpd side of software I choose is nginx, I like its versatility and efficiency.</p>
<p>Inside the server block, we must have the following lines:</p>
<pre>
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256: DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA";
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 5m;

ssl_dhparam /etc/nginx/ssl/dhparams.pem;

add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; # includeSubdomains only needed for the whole site encryption. You may or may not need it.

# The following settings only works with CA certified certs, not self-signed certs.
ssl_stapling on; 
resolver 8.8.8.8;
ssl_trusted_certificate /etc/nginx/ssl/root.crt; # Your CA Root cert.
</pre>
<p>The main purpose of Line 1 is to stop accepting requests from insecure protocols such as SSLv2, Line 2 restricts the cipher we will be using, and stop some insecure ciphers such as MD5 and RC4. If we add RC4 back on the list, we eliminate the chance to get BEAST attack, but will suffer RC4 attack. By removing RC4, some of the older browsers will not support visiting the website and possible to suffer BEAST attack. The future trend is, RC4 attack will get more sophisticated, and chance of BEAST attack will get smaller, I&#8217;d recommend to remove RC4 from the list.</p>
<p>Line 4 and 5 are for the SSL reuse, this can improve the performance. Line 6, 7, 8 are related to OCSP stapling, it enables the server to check the OCSP status, which can check the revocation of the certificates. The root.crt is the Class 1 PKI key of your CA.</p>
<p>Go to SSLLabs for a test, you might get an A+ if your signing authority is trusted!</p>
<p>Read more:<br />
<a href="http://crypto.stackexchange.com/questions/8933/how-can-i-use-ssl-tls-with-perfect-forward-secrecy" target="_blank">http://crypto.stackexchange.com/questions/8933/how-can-i-use-ssl-tls-with-perfect-forward-secrecy</a><br />
<a href="https://community.qualys.com/blogs/securitylabs/2013/08/05/configuring-apache-nginx-and-openssl-for-forward-secrecy" target="_blank">https://community.qualys.com/blogs/securitylabs/2013/08/05/configuring-apache-nginx-and-openssl-for-forward-secrecy</a><br />
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/08/https-as-ranking-signal_6.html" target="_blank">http://googleonlinesecurity.blogspot.co.uk/2014/08/https-as-ranking-signal_6.html</a><br />
<a href="https://istlsfastyet.com/?utm_source=wmx_blog&#038;utm_medium=referral&#038;utm_campaign=tls_en_post" target="_blank">https://istlsfastyet.com/?utm_source=wmx_blog&#038;utm_medium=referral&#038;utm_campaign=tls_en_post</a><br />
<a href="http://chimera.labs.oreilly.com/books/1230000000545/ch04.html#TLS_RECORD_SIZE" target="_blank">http://chimera.labs.oreilly.com/books/1230000000545/ch04.html#TLS_RECORD_SIZE</a><br />
<a href="https://gist.github.com/plentz/6737338" target="_blank">https://gist.github.com/plentz/6737338</a><br />
<a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_trusted_certificate" target="_blank">http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_trusted_certificate</a><br />
<a href="http://nginx.com/blog/nginx-poodle-ssl/" target="_blank">http://nginx.com/blog/nginx-poodle-ssl/</a><br />
<a href="https://weakdh.org/sysadmin.html" target="_blank">https://weakdh.org/sysadmin.html</a></p>
<p>Changelog:<br />
2014.08.13 &#8211; Added 3DES back to cipher suites for Windows XP compability.<br />
2014.10.17 &#8211; SSLv3 support is removed (POODLE). Strict Transport Security is added.<br />
2015.03.03 &#8211; RC4 removed and banned.<br />
2015.06.02 &#8211; Update DH strength</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/ssl-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">404</post-id>	</item>
	</channel>
</rss>
