title: Amazon S3 - hostname does not match the server certificate (OpenSSL::SSL::SSLError) + rails
body: <p><code>Amazon S3</code>, using <code>rails</code> and <code>fog</code>.
  Trying to precompile my assets with <code>rake assets:precompile</code>: </p>
  
  <p>message: </p>
  
  <pre><code>[WARNING] fog: followed redirect to myproject.de.s3-us-west-2.amazonaws.com, connecting to the matching region will be more performant
  rake aborted!
  hostname does not match the server certificate (OpenSSL::SSL::SSLError)
  </code></pre>
  
  <p>So there is something with OpenSSL</p>
  
  <p>What I tried already: </p>
  
  <ol>
  <li><p>I have already tried to config certificates in <code>application.rb</code> like this: with no success.</p>
  
  <p>AWS.config(:http_handler => AWS::Http::HTTPartyHandler.new(:ssl_ca_path =>   "/etc/ssl/certs"))</p></li>
  <li><p>also installed <code>openssl</code> on Ubuntu 12.04 from <a href="https://launchpad.net/ubuntu/precise/+source/openssl" rel="noreferrer">here</a></p></li>
  </ol>
  
  <p><strong>Question is:</strong>
  How Amazon S3 deals with certificates </p>