<?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>Looking for the paradigm &#187; ssl</title>
	<atom:link href="http://www.evanhoffman.com/evan/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evanhoffman.com/evan</link>
	<description>So I can pass it off</description>
	<lastBuildDate>Thu, 26 Jan 2012 22:17:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Load balancing in EC2 with Nginx and HAProxy</title>
		<link>http://www.evanhoffman.com/evan/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=load-balancing-in-ec2-with-nginx-and-haproxy</link>
		<comments>http://www.evanhoffman.com/evan/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 22:00:22 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[elastic loadbalancer]]></category>
		<category><![CDATA[elb]]></category>
		<category><![CDATA[gslb]]></category>
		<category><![CDATA[haproxy]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancer]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[reverse proxy]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1764</guid>
		<description><![CDATA[TweetWe wanted to setup a loadbalanced web cluster in AWS for expansion. My first inclination was to use ELB for this, but I soon learned that ELB doesn&#8217;t let you allocate a static IP, requiring you to refer to it only by DNS name. This would be OK except for the fact that our current [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/&via=EvanHoffman&text=Load balancing in EC2 with Nginx and HAProxy&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/"></g:plusone></div><p>We wanted to setup a loadbalanced web cluster in AWS for expansion.  My first inclination was to use <a href="http://aws.amazon.com/elasticloadbalancing/">ELB</a> for this, but I soon learned that ELB doesn&#8217;t let you allocate a static IP, requiring you to refer to it only by DNS name.  This would be OK except for the fact that our current DNS provider, <a href="http://dyn.com/dns/dynect-managed-dns/">Dyn</a>, requires IP addresses when using their GSLB (geo-based load balancer) service.</p>
<p>Rather than let this derail the whole project, I decided to look into the software options available for loadbalancing in EC2.  I&#8217;ve been a fan of hardware load balancers for a while, sort of looking down at software-based solutions without any real rationale, but in this case I really had no choice so I figured I&#8217;d give it a try.</p>
<p>My first stop was Nginx.  I&#8217;ve used it before in a reverse-proxy scenario and like it.  The problem I had with it was that it doesn&#8217;t support active polling of nodes &#8211; the ability to send requests to the webserver and mark the node as up or down based on the response.  As far as I can tell, using <a href="http://wiki.nginx.org/HttpUpstreamModule">multiple upstream servers</a> in Nginx allows you to specify <tt>max_fails</tt> and <tt>fail_timeout</tt>, however a &#8220;fail&#8221; is determined when a real request comes in.  I don&#8217;t want to risk losing a real request &#8211; I like active polling.<br />
<span id="more-1764"></span><br />
This led me to HAProxy.  I&#8217;d never used HAProxy before but it seemed to be ideally suited to this (since it&#8217;s exclusively a load balancer).  The <tt>option httpchk</tt> even allows for active polling of nodes &#8211; yay!</p>
<p>Unfortunately, HAProxy doesn&#8217;t support SSL.  From <a href="http://haproxy.1wt.eu/">the HAProxy site</a>:</p>
<blockquote><p>People often ask for SSL and Keep-Alive support. Both features will complicate the code and render it fragile for several releases. By the way, both features have a negative impact on performance :</p>
<p>    Having SSL in the load balancer itself means that it becomes the bottleneck. When the load balancer&#8217;s CPU is saturated, the overall response times will increase and the only solution will be to multiply the load balancer with another load balancer in front of them. the only scalable solution is to have an SSL/Cache layer between the clients and the load balancer. Anyway for small sites it still makes sense to embed SSL, and it&#8217;s currently being studied. There has been some work on the CyaSSL library to ease integration with HAProxy, as it appears to be the only one out there to let you manage your memory yourself. </p></blockquote>
<p>Poop!  I figured out a workaround however, by using both Nginx and HAProxy on the same instance.  HAProxy listens on port 80 and 8443 (so that it can relay decrypted SSL traffic to the nodes on a separate port, so that the nodes are aware that it was originally SSL traffic).  Nginx is configured as a reverse proxy, listens on port 443 only, and has the SSL cert &#038; key.  The upstream for the Nginx is just localhost:8443 &#8211; HAProxy.  </p>
<p>This was pretty easy to setup and works very well.  I benchmarked HAProxy on an EC2 t1.micro instance (in front of two m1.large instances running our webapp) using <tt>ab -n 5000 -c 50 -t 60</tt> and found it actually performed better than one of our hardware load balancers.  That was pretty eye-opening (and sad).</p>
<p>The HAProxy and Nginx configs are below, in the hopes that it helps someone.  The main warning I&#8217;d give is that using this will cause the logs on your nodes to interpret all requests as coming from the IP of the load balancer.  I had to rewrite some code to have the app use the X-Forwarded-For address rather than the <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getRemoteAddr%28%29">REMOTE_ADDR</a>, but other than that this has been working out pretty well.</p>
<p>/etc/nginx/nginx.conf<br />
Main thing is to make sure the server isn&#8217;t listening on port 80 (since HAProxy needs to).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">user              nginx;
worker_processes  1;
&nbsp;
error_log  /var/log/nginx/error.log;
&nbsp;
pid        /var/run/nginx.pid;
&nbsp;
events {
    worker_connections  1024;
}
&nbsp;
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
&nbsp;
    log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '
                      '$status $body_bytes_sent &quot;$http_referer&quot; '
                      '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';
&nbsp;
    access_log  /var/log/nginx/access.log  main;
&nbsp;
    sendfile        on;
    keepalive_timeout  65;
&nbsp;
    #
    # The default server
    #
    server {
        listen       81;
        server_name  _;
&nbsp;
        location / {
            root   /usr/share/nginx/html;
            index  index.html index.htm;
        }
&nbsp;
        error_page  404              /404.html;
        location = /404.html {
            root   /usr/share/nginx/html;
        }
&nbsp;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
&nbsp;
    }
&nbsp;
    # Load config files from the /etc/nginx/conf.d directory
    include /etc/nginx/conf.d/*.conf;
&nbsp;
}</pre></td></tr></table></div>

<p>/etc/nginx/conf.d/ssl-offloader.conf</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">upstream haproxy {
        server localhost:8443 ;
}
&nbsp;
server {
        listen       443;
        server_name f.q.d.n 1.2.3.4 ; # I put the FQDN and IP here, but maybe &quot;_&quot; will work too
#  server_name  _;
&nbsp;
        ssl                  on;
        ssl_certificate      /etc/nginx/ssl-cert/cert.pem;
        ssl_certificate_key  /etc/nginx/ssl-cert/cert.key;
&nbsp;
        ssl_session_timeout  5m;
&nbsp;
        ssl_protocols  SSLv3 TLSv1;
        ssl_ciphers     ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
        ssl_prefer_server_ciphers   on;
&nbsp;
        location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header X-NginX-Proxy true;
&nbsp;
                proxy_pass http://haproxy/;
                proxy_redirect default;
                proxy_redirect http://$host/ https://$host/;
                proxy_redirect http://hostname/ https://$host/;
&nbsp;
                proxy_read_timeout 15s;
                proxy_connect_timeout 15s;
        }
&nbsp;
}</pre></td></tr></table></div>

<p>/etc/haproxy/haproxy.cfg</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    log         127.0.0.1 local2
&nbsp;
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy
    daemon
&nbsp;
    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats
&nbsp;
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    3s
    timeout queue           1m
    timeout connect         2s
    timeout client          5s
    timeout server          5s
    timeout http-keep-alive 1s
    timeout check           10s
    maxconn                 3000
&nbsp;
       stats enable
       stats auth evan:change_me_brother
&nbsp;
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend  main_http *:80
        option forwardfor except 127.0.0.1  
        option httpclose
        default_backend         web_http
&nbsp;
frontend main_https *:8443
        option forwardfor except 127.0.0.1  
        option httpclose
        default_backend         web_https
&nbsp;
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend web_http
    balance     roundrobin
#       option httpchk GET / HTTP/1.1\r\nHost:\ host.com
        option httpchk
    server  node1 192.168.1.20:80 check port 80
    server  node2 192.168.1.30:80 check port 80
    server  node3 192.168.1.40:80 check port 80
&nbsp;
&nbsp;
backend web_https
    balance     roundrobin
#       option httpchk GET / HTTP/1.1\r\nHost:\ host.com
        option httpchk
    server  node1 192.168.1.20:8443 check port 8443
    server  node2 192.168.1.30:8443 check port 8443
    server  node3 192.168.1.40:8443 check port 8443</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making sure SSLv2 is disabled in Apache (and Nginx)</title>
		<link>http://www.evanhoffman.com/evan/2011/09/20/making-sure-sslv2-is-disabled-in-apache/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=making-sure-sslv2-is-disabled-in-apache</link>
		<comments>http://www.evanhoffman.com/evan/2011/09/20/making-sure-sslv2-is-disabled-in-apache/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 18:06:38 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[beast]]></category>
		<category><![CDATA[cipher]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mitm]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sslciphersuite]]></category>
		<category><![CDATA[sslv2]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1606</guid>
		<description><![CDATA[Tweet Edit Jan 24, 2012: Deleted all the crap from this story and just left the recommended Apache and Nginx SSL cipher suites for maximum security without SSLv2 and without BEAST vulnerability (at least according to Qualys). Apache httpd SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM; SSLHonorCipherOrder on nginx ssl_protocols SSLv3 TLSv1; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM; ssl_prefer_server_ciphers on; [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/09/20/making-sure-sslv2-is-disabled-in-apache/&via=EvanHoffman&text=Making sure SSLv2 is disabled in Apache (and Nginx)&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/09/20/making-sure-sslv2-is-disabled-in-apache/"></g:plusone></div><p><ins datetime="2012-01-24T03:50:52+00:00"><br />
<strong>Edit Jan 24, 2012: </strong> Deleted all the crap from this story and just left the recommended Apache and Nginx SSL cipher suites for maximum security without SSLv2 and without BEAST vulnerability (at least according to Qualys).<br />
</ins><br />
<strong>Apache httpd</strong></p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
SSLHonorCipherOrder on</pre></div></div>

<p><strong>nginx</strong></p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">        ssl_protocols  SSLv3 TLSv1;
        ssl_ciphers     ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
        ssl_prefer_server_ciphers   on;</pre></div></div>

<p>Source: </p>
<ul>
<li>
<a href="https://community.qualys.com/blogs/securitylabs/2011/10/17/mitigating-the-beast-attack-on-tls">Qualys</a></li>
<li><a href="https://www.ssllabs.com/ssldb/">SSL checker</a></li>
</ul>
<p><a target="_blank" href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"><img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" border="0" width="468"  height="60" alt="Go Daddy $12.99 SSL Sale!"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/09/20/making-sure-sslv2-is-disabled-in-apache/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wasted time with Exchange 2010, SquirrelMail, and IMAP-SSL</title>
		<link>http://www.evanhoffman.com/evan/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl</link>
		<comments>http://www.evanhoffman.com/evan/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 21:32:11 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[140790E5]]></category>
		<category><![CDATA[143]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[993]]></category>
		<category><![CDATA[995]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[imap.rb]]></category>
		<category><![CDATA[imaps]]></category>
		<category><![CDATA[initialize]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[squirrelmail]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSL23_WRITE]]></category>
		<category><![CDATA[sslerror]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=941</guid>
		<description><![CDATA[TweetI&#8217;m setting up SquirrelMail to point to my Exchange 2010 server via IMAP (don&#8217;t ask) and couldn&#8217;t get SM to talk to Exchange on port 993 (imaps). Even though the servers on the same subnet, any time passwords are being sent over the network I like to opt for SSL. I found a couple of [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/&via=EvanHoffman&text=Wasted time with Exchange 2010, SquirrelMail, and IMAP-SSL&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/"></g:plusone></div><p>I&#8217;m setting up SquirrelMail to point to my Exchange 2010 server via IMAP (don&#8217;t ask) and couldn&#8217;t get SM to talk to Exchange on port 993 (imaps).  Even though the servers on the same subnet, any time passwords are being sent over the network I like to opt for SSL.  I found a couple of sites suggesting that the problem was that there was no SSL certificate installed, but I knew for a fact there was a valid certificate because I could get to https://webmail.example.com/ for OWA.</p>
<p>Some of the errors SquirrelMail was reporting were &#8220;Error connecting to IMAP server xxxx Server error: (0)&#8221; and &#8220;Error connecting to IMAP server: tls://xxxx:993. 0: &#8221;</p>
<p>Nothing would actually work on port 993.  Telnet to 993 got this:</p>
<pre>
$ telnet 10.0.20.18 993
Trying 10.0.20.18...
Connected to 10.0.20.18.
Escape character is '^]'.
* BYE Connection is closed. 14
Connection closed by foreign host.
</pre>
<p>After too much poking, I decided to go down to a lower level and do a simple openssl certificate retrieval and see what came back:</p>
<pre>

$ openssl s_client -connect 10.0.20.18:993
CONNECTED(00000003)
140281653434184:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:699:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 113 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
</pre>
<p>That didn&#8217;t look right, so I ran it against the same server on port 443 and got back a real certificate.  Same for port 995 (pop3s):</p>
<pre>
$ openssl s_client -connect 10.0.20.18:443
CONNECTED(00000003)
depth=3 L = ValiCert Validation Network, O = "ValiCert, Inc.", OU = ValiCert Class 2 Policy Validation Authority, CN = http://www.valicert.com/, emailAddress = info@valicert.com
verify return:1
depth=2 C = US, O = "The Go Daddy Group, Inc.", OU = Go Daddy Class 2 Certification Authority
verify return:1

(snip)
</pre>
<p>So there&#8217;s just something wrong with SSL on port 993.  To make a long story short, I had to use the <a href="http://technet.microsoft.com/en-us/library/aa997231.aspx">Enable-ExchangeCertificate</a> to apply the SSL certificate to port 993.  First, run &#8220;Get-ExchangeCertificate&#8221; to list the available certificates and retrieve the Thumbprint.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #000000;">&#91;</span><span style="color: #008080; font-weight: bold;">PS</span><span style="color: #000000;">&#93;</span> C:\Windows\system32<span style="color: pink;">&gt;</span>Get<span style="color: pink;">-</span>ExchangeCertificate
&nbsp;
Thumbprint                                Services   Subject
<span style="color: pink;">----------</span>                                <span style="color: pink;">--------</span>   <span style="color: pink;">-------</span>
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy  .P....     CN<span style="color: pink;">=</span>exch2010fe1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  I..W..     CN<span style="color: pink;">=</span>webmail.example.com<span style="color: pink;">,</span> OU<span style="color: pink;">=</span>Domain Control Validated<span style="color: pink;">,</span> O<span style="color: pink;">=</span>webmail.ex...</pre></div></div>

<p>Copy &#038; paste the thumbprint for whichever cert you want to use into Enable-ExchangeCertificate:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #000000;">&#91;</span><span style="color: #008080; font-weight: bold;">PS</span><span style="color: #000000;">&#93;</span> C:\Windows\system32<span style="color: pink;">&gt;</span>Enable<span style="color: pink;">-</span>ExchangeCertificate <span style="color: pink;">-</span>ThumbPrint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <span style="color: pink;">-</span>Services IIS<span style="color: pink;">,</span>P
OP<span style="color: pink;">,</span>IMAP <span style="color: pink;">-</span>DoNotRequireSSL
<span style="color: #000000;">&#91;</span><span style="color: #008080; font-weight: bold;">PS</span><span style="color: #000000;">&#93;</span> C:\Windows\system32<span style="color: pink;">&gt;</span>Get<span style="color: pink;">-</span>ExchangeCertificate
&nbsp;
Thumbprint                                Services   Subject
<span style="color: pink;">----------</span>                                <span style="color: pink;">--------</span>   <span style="color: pink;">-------</span>
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy  ......     CN<span style="color: pink;">=</span>exch2010fe1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  IP.W..     CN<span style="color: pink;">=</span>webmail.example.com<span style="color: pink;">,</span> OU<span style="color: pink;">=</span>Domain Control Validated<span style="color: pink;">,</span> O<span style="color: pink;">=</span>webmail.ex...</pre></div></div>

<p>After running that, imaps on port 993 worked perfectly.  I can connect to it with both SquirrelMail and Thunderbird.</p>
<p>The SquirrelMail config looks like this:</p>
<pre>
IMAP Settings
--------------
4.  IMAP Server            : webmail.example.com
5.  IMAP Port              : 993
6.  Authentication type    : login
7.  Secure IMAP (TLS)      : true
8.  Server software        : exchange
9.  Delimiter              : detect
</pre>
<p><b>Edit Feb 15, 2011</b>: I just renewed the SSL cert and ran into a problem with a Ruby script that was suddenly unable to check a mailbox over IMAPS.  The error received was:</p>
<pre>
/usr/lib/ruby/1.8/net/imap.rb:898:in `connect': unknown protocol (OpenSSL::SSL::SSLError)
        from /usr/lib/ruby/1.8/net/imap.rb:898:in `initialize'
</pre>
<p>After a few minutes, I remembered this blog post and ran Enable-ExchangeCertificate and it worked again.  Glad I wrote it down.</p>
<p>CONNECTED(00000003) 26831:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up InspIRCd as an internal IRC server for companywide chat</title>
		<link>http://www.evanhoffman.com/evan/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat</link>
		<comments>http://www.evanhoffman.com/evan/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 21:16:12 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[inspircd]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[ircd]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=883</guid>
		<description><![CDATA[TweetI got this idea (from this blog post) that it would be cool and great if we had an IRC server to facilitate communication within our team.  I started checking out some different IRC servers to see which ones supported the main features I wanted (LDAP auth &#38; SSL).  I started out with ratbox but [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/&via=EvanHoffman&text=Setting up InspIRCd as an internal IRC server for companywide chat&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/"></g:plusone></div><p>I got this idea (<a href="http://teddziuba.com/2010/01/break-my-concentration-and-i-b.html" target="_blank">from this blog post</a>) that it would be cool and great if we had an IRC server to facilitate communication within our team.  I started checking out some different IRC servers to see which ones supported the main features I wanted (LDAP auth &amp; SSL).  I started out with ratbox but I didn&#8217;t really like it.  I found InspIRCd and after some config tweaking it&#8217;s working well.  Here&#8217;s the info from modules.conf for authentication against Active Directory (so people login with their AD usernames):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;m_ldapauth.so&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ldapauth</span> <span style="color: #000066;">baserdn</span>=<span style="color: #ff0000;">&quot;OU=Users,DC=example,DC=com&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">attribute</span>=<span style="color: #ff0000;">&quot;sAMAccountName&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;ldap://activedirectory.example.com&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">killreason</span>=<span style="color: #ff0000;">&quot;LDAP auth failed&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">searchscope</span>=<span style="color: #ff0000;">&quot;subtree&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">binddn</span>=<span style="color: #ff0000;">&quot;CN=binduser,OU=Users,DC=example,DC=com&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">bindauth</span>=<span style="color: #ff0000;">&quot;password&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">verbose</span>=<span style="color: #ff0000;">&quot;yes&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">userfield</span>=<span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></td></tr></table></div>

<p>Here&#8217;s the configure line (since I had to build from source):</p>
<pre>./configure --prefix=/usr/local/inspircd --enable-gnutls --uid 101 --enable-extras=m_ldapauth.cpp --enable-extras=m_ldapoper.cpp</pre>
<p>I still have some more customization to do to make ChanServ work, but since this is internal I don&#8217;t know if that even matters.  Also I can&#8217;t seem to get SSL working &#8211; I tried compiling with &#8211;enable-openssl but that failed, so I went with &#8211;enable-gnutls, which worked, but I can&#8217;t connect via ircs:// in my client.  If it looks like people are interested in this I may fix it up, but I have a feeling most people won&#8217;t be as enthused about it as I am.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Forcing WordPress administration over SSL</title>
		<link>http://www.evanhoffman.com/evan/2010/09/20/forcing-wordpress-administration-over-ssl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=forcing-wordpress-administration-over-ssl</link>
		<comments>http://www.evanhoffman.com/evan/2010/09/20/forcing-wordpress-administration-over-ssl/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 19:46:05 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=635</guid>
		<description><![CDATA[TweetI never like typing a password into a non-SSL site, no matter how trivial it is. In order to give my own site this ability I simply used mod_rewrite to force requests to WordPress&#8217;s admin pages to go over SSL. The .htaccess file for the site looks like this: # BEGIN WordPress &#60;ifModule mod_rewrite.c&#62; RewriteEngine [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/09/20/forcing-wordpress-administration-over-ssl/&via=EvanHoffman&text=Forcing WordPress administration over SSL&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/09/20/forcing-wordpress-administration-over-ssl/"></g:plusone></div><p>I never like typing a password into a non-SSL site, no matter how trivial it is.  In order to give my own site this ability I simply used mod_rewrite to force requests to WordPress&#8217;s admin pages to go over SSL.</p>
<p>The .htaccess file for the site looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># BEGIN WordPress</span>
&lt;<span style="color: #000000; font-weight:bold;">ifModule</span> mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /evan/
<span style="color: #00007f;">RewriteRule</span> ^index\.php$ - [L]
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-f
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-d
<span style="color: #00007f;">RewriteRule</span> . /evan/index.php [L]
&lt;/<span style="color: #000000; font-weight:bold;">ifModule</span>&gt;
&nbsp;
<span style="color: #adadad; font-style: italic;"># END WordPress</span></pre></div></div>

<p>To force the admin pages to SSL, just add these lines under <strong>RewriteEngine On</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteCond</span> %{HTTPS} !=<span style="color: #0000ff;">on</span>
<span style="color: #00007f;">RewriteRule</span> ^wp-(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}      [R,L]</pre></div></div>

<p><strong>Edit</strong> &#8211; The above code screws up uploads (which go into the /wp-content directory).  I replaced that with the following and it Worked As Intended.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteCond</span> %{HTTPS} !=<span style="color: #0000ff;">on</span>
<span style="color: #00007f;">RewriteRule</span> ^wp-login(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}      [R,L]
<span style="color: #00007f;">RewriteCond</span> %{HTTPS} !=<span style="color: #0000ff;">on</span>
<span style="color: #00007f;">RewriteRule</span> ^wp-admin(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}      [R,L]</pre></div></div>

<p>That&#8217;s pretty much it.  If your request starts with &#8220;wp-&#8221; it&#8217;ll redirect you to the same URL, but starting with https://.  Problem solved.  You do need to make sure you have an SSL VirtualHost pointing to your WordPress DocumentRoot so that https://yoursite.com goes to the same place as http://yoursite.com.</p>
<p><a target="_blank" href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"><img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" border="0" width="468"  height="60" alt="Go Daddy $12.99 SSL Sale!"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/09/20/forcing-wordpress-administration-over-ssl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Outlook 2007 &amp; Exchange 2010 Autodiscover SSL certificate error annoyance</title>
		<link>http://www.evanhoffman.com/evan/2010/07/27/outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance</link>
		<comments>http://www.evanhoffman.com/evan/2010/07/27/outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 15:51:54 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[autodiscover]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mismatch]]></category>
		<category><![CDATA[srv]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[_autodiscover]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=445</guid>
		<description><![CDATA[TweetOne of the more annoying side effects of migrating my mailbox to Exchange 2010 has been the nagging of Outlook 2007&#8242;s Autodiscovery feature. Now, every time I start Outlook I get hit with a certificate error for autodiscover.domain.com. Now, autodiscover.domain.com is a CNAME to mail.domain.com, which is the OWA URL for the CAS. The SSL [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/07/27/outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance/&via=EvanHoffman&text=Outlook 2007 &amp; Exchange 2010 Autodiscover SSL certificate error annoyance&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/07/27/outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance/"></g:plusone></div><p>One of the more annoying side effects of migrating my mailbox to Exchange 2010 has been the nagging of Outlook 2007&#8242;s Autodiscovery feature.  Now, every time I start Outlook I get hit with a certificate error for autodiscover.domain.com.  Now, autodiscover.domain.com is a CNAME to mail.domain.com, which is the OWA URL for the CAS.  The SSL certificate is valid &#8211; but it&#8217;s valid for mail.domain.com.  I could buy <a href="http://www.godaddy.com/ssl/ssl-certificates.aspx?ci=21754&#038;isc=IAPssl5" title="Go Daddy $12.99 SSL Sale!">a SSL certificate from GoDaddy for $12.99</a> (an insanely great price, btw) for &#8220;autodiscover&#8221; but that would also require using another IP address on the CAS (since you can can only bind one SSL certificate to an IP:port pair), and that seems like a waste of an IP address.</p>
<p>I found a possible solution in <a href="http://support.microsoft.com/kb/940726">KB 940726</a>.  Basically you use this cmdlet to change the Autodiscover URI for internal clients:</p>
<blockquote><p>Set-ClientAccessServer –AutodiscoverServiceInternalUri https://<strong>mail.contoso.com</strong>/autodiscover/autodiscover.xml </p></blockquote>
<p>You&#8217;d replace mail.contoso.com with the external URL of your OWA server (in my case, mail.domain.com).  I&#8217;ve made the changes but I think I need to wait for AD propagation.  Hopefully this will resolve it, because I don&#8217;t want to move everyone&#8217;s mailboxes over until this thing is &#8220;perfect,&#8221; whatever that means.</p>
<p><strong>Edit:</strong> I also needed to add a SRV record so Outlook would know what host to check for autodiscovery when outside the domain.</p>
<p><strong>Edit 2:</strong>: Also need to install a hotfix or be running Outlook 2007 SP1 or later for the SRV functionality.</p>
<p><strong>Edit 3</strong>: It occurs to me that a simpler fix for this issue may be simply to delete the DNS record for autodiscover entirely.  That way, when Outlook attempts to open the SSL connection to autodiscover.domain.com, it gets a NXDOMAIN error (should) silently skip it.  Unfortunately we have wildcard DNS active for our domain.</p>
<p>Other useful resources:</p>
<ul>
<li><a href="http://msexchangeteam.com/archive/2007/09/21/447067.aspx">MS Exchange Team blog post comparing the various autodiscover schemes.</a></li>
<li> <a href="http://technet.microsoft.com/en-us/library/bb125157.aspx">Set-ClientAccessServer</a>.</li>
<li><a href="https://www.testexchangeconnectivity.com/">Test Exchange Connectivity<a></li>
<li><a href="http://support.microsoft.com/kb/940881">Setting Autodiscover URL via DNS SRV record</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/bb332063%28EXCHG.80%29.aspx">Autodiscover whitepaper</a>.
<li><a href="http://www.lengoldenstein.com/2008/09/29/creating-an-outlook-2007sp1-autodiscover-dns-record-with-bind/">Example Autodiscover BIND record</a> &#8211; <tt>_autodiscover._tcp.domain.com. SRV 0 0 443 webmail.domain.com.</tt></li>
<li><a href="http://blog.tiensivu.com/aaron/archives/1398-Little-known-Outlook-feature-Hold-down-Ctrl,-right-click-on-tray-icon-Connection-Status-appears.html">Debug Autodiscover</a> by right-clicking the Outlook icon in the system tray while holding down Ctrl</li>
<li><a href="http://support.microsoft.com/kb/816587">Verifying SRV records exist with nslookup</a></li>
<li><a href="http://support.microsoft.com/kb/928116">What version of Outlook am I running?</a>  You need SP1 or later for the SRV hack.</li>
<li><a href="http://support.microsoft.com/kb/939184/">Hotfix for Outlook 2007 (pre-SP1) to use SRV records for autodiscovery</a></li>
</ul>
<p><a target="_blank" href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"><img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" border="0" width="468"  height="60" alt="Go Daddy $12.99 SSL Sale!"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/07/27/outlook-2007-exchange-2010-autodiscover-ssl-certificate-error-annoyance/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Monitoring SSL certificate expiration with ssl-cert-check</title>
		<link>http://www.evanhoffman.com/evan/2009/08/31/monitoring-ssl-certificate-expiration-with-ssl-cert-check/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=monitoring-ssl-certificate-expiration-with-ssl-cert-check</link>
		<comments>http://www.evanhoffman.com/evan/2009/08/31/monitoring-ssl-certificate-expiration-with-ssl-cert-check/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 19:29:11 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=159</guid>
		<description><![CDATA[TweetI was about to write a script using OpenSSL to monitor the SSL certificate expiration dates for a few servers when it dawned on me that someone had probably done this already. The ssl-cert-check shell script takes a list of hosts/ports and prints out the expiration date (and how many days away that date is). [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2009/08/31/monitoring-ssl-certificate-expiration-with-ssl-cert-check/&via=EvanHoffman&text=Monitoring SSL certificate expiration with ssl-cert-check&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2009/08/31/monitoring-ssl-certificate-expiration-with-ssl-cert-check/"></g:plusone></div><p>I was about to write a script using OpenSSL to monitor the SSL certificate expiration dates for a few servers when it dawned on me that someone had probably done this already.</p>
<p>The <a href="http://prefetch.net/articles/checkcertificate.html">ssl-cert-check</a> shell script takes a list of hosts/ports and prints out the expiration date (and how many days away that date is).  It can also be configured to email a message for any certificates expiring in less than N days for easy cronibility (?).  Seems lovely!</p>
<p><a target="_blank" href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"><img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" border="0" width="468"  height="60" alt="Go Daddy $12.99 SSL Sale!"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2009/08/31/monitoring-ssl-certificate-expiration-with-ssl-cert-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

