<?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>Eric Mason &#187; ruby</title>
	<atom:link href="http://ericmason.net/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericmason.net</link>
	<description>From Fort Lauderdale, Ruby, Linux, Photography, and Random Things</description>
	<lastBuildDate>Tue, 15 Nov 2011 20:22:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SOAP4R and SSL: unable to get local issuer certificate</title>
		<link>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/</link>
		<comments>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 13:16:40 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=55</guid>
		<description><![CDATA[After enabling SSL on a couple of apps, I got an email from one of my cron jobs telling me my SOAP API was no longer working.  (This is why you always want to have an entry in /etc/aliases forwarding &#8230; <a href="http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After enabling SSL on a couple of apps, I got an email from one of my cron jobs telling me my SOAP API was no longer working.  (This is why you always want to have an entry in /etc/aliases forwarding root&#8217;s email to an account you will read)</p>
<p>The error message was &#8220;unable to get local issuer certificate.&#8221;  I thought, no big deal, there must be an easy way to get SOAP4R to find all the root CA certificates.  Unfortunately it took a while searching Google to find the right answer, so I&#8217;m posting it here to make it easier for the next person (which just might be me next week).</p>
<p><span id="more-55"></span></p>
<p>It turns out SOAP4R will read a file called <strong>&#8220;soap/property&#8221;</strong> in your ruby library path (which can usually be the directory your app is in).  You can place certain configuration options in this file to control how SOAP4R behaves.  In this case, I needed to add<br />
<code><br />
client.protocol.http.ssl_config.ca_file=/etc/ssl/certs/ca-certificates.crt<br />
</code></p>
<p>This fixed the &#8220;unable to get local issuer certificate&#8221; error right away.</p>
<p>There was another problem though; it was complaining about the hostname not matching the certificate.  Since I&#8217;m using a wildcard certificate, I assume this means OpenSSL doesn&#8217;t respect wildcard certificates.  I grudgingly added this to soap/property file<br />
<code><br />
client.protocol.http.ssl_config.verify_mode=OpenSSL::SSL::VERIFY_NONE<br />
</code><br />
And it&#8217;s fine now.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/&via=ericmason&text=SOAP4R and SSL: unable to get local issuer certificate&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

