title: REST::Client: how to ignore SSL certificates
body: <p>I am working with <code>REST::Client</code> and my code fails with SSL error.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>#!usr/bin/perl -w
  use strict;
  use REST::Client;
  
  my $client = REST::Client-&gt;new();
  
  $client-&gt;GET("https://something/api/sessions");
  print $client-&gt;responseContent();
  </code></pre>
  
  <p>and here is the output:</p>
  
  <pre><code>WP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /usr/local/share/perl/5.10.1/LWP/Protocol/http.pm line 51.
  </code></pre>
  
  <p>I know the problem. <code>REST::Client</code> is not able to ignore the SSL certificate.</p>
  
  <p>I get the exact same error with <code>curl</code> when I do not use "-k" option:</p>
  
  <p>here is curl command:</p>
  
  <pre><code>curl -i -H "Accept:application/*+xml;version=1.5" -u "username@system:password" -X post https://something/api/sessions
  </code></pre>
  
  <p>and here is curl output(Error):</p>
  
  <pre><code>curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
  </code></pre>
  
  <p>However, if I add "-k" to the curl command, then it works just fine.</p>
  
  <p>From curl's man page, here is the explanation of "-k":</p>
  
  <pre><code>(SSL)  This  option  explicitly  allows  curl to perform "insecure" SSL connections and transfers.
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>So, How do I make <code>REST::Client</code> ignore the SSL certificate? OR is there any other elegant way to work with? I gone through the <code>REST::Client</code> documentation on CPAN but it does not talk anything about this.</p>
  
  <p>Thanks.</p>