title: Why does LWP fail to connect with "500 SSL negotiation failed"?
body: <p>My Perl script sends some information to a remote server.</p>
  
  <p>Below is a portion of the code</p>
  
  <pre class="lang-perl prettyprint-override"><code>#!/var/hvmail/libexec/perl
  
  use strict;
  
  use HTTP::Request::Common qw(POST);
  use LWP::UserAgent;
  
  use constant HANDLER_URL =&gt; "https://www.website.com/handler.php";
  
  $ENV{HTTPS_DEBUG} = 1;
  
  my $ua = LWP::UserAgent-&gt;new;
  
  # Some DB stuff, not applicable
  my $row; # This is a DB row ($sth-&gt;fetchrow_hashref())   
  
  my $req = POST ''.HANDLER_URL, [ %$row ]; 
  my $res = $ua-&gt;request($req);
  </code></pre>
  
  <p><code>$res-&gt;is_success</code> is <em>false</em> with <code>$res-&gt;status_line</code> being</p>
  
  <pre class="lang-none prettyprint-override"><code>500 SSL negotiation failed
  </code></pre>
  
  <p>We are running CentOS 6.4, Perl 5.10.1, OpenSSL 1.0.1e-fips.</p>
  
  <h3>Update</h3>
  
  <p>Here's the full output:</p>
  
  <pre class="lang-none prettyprint-override"><code>SSL_connect:before/connect initialization
  SSL_connect:SSLv2/v3 write client hello A
  SSL3 alert read:fatal:handshake failure
  SSL_connect:error in SSLv2/v3 read server hello A
  SSL_connect:before/connect initialization
  SSL_connect:SSLv3 write client hello A
  SSL3 alert read:fatal:handshake failure
  SSL_connect:failed in SSLv3 read server hello A
  SSL_connect:before/connect initialization
  SSL_connect:SSLv2 write client hello A
  SSL_connect:failed in SSLv2 read server hello A
  Error: [ 500 SSL negotiation failed:  ]
  </code></pre>
  
  <h3>Requested Command Output</h3>
  
  <pre class="lang-none prettyprint-override"><code>Can't locate Net/SSLeay.pm
  Can't locate LWP/Protocol/https.pm
  </code></pre>