title: PerL SSL connect attempt failed because of handshake problems
body: <p><BR>
  I'm hoping someone can help, I'm using the nagios plugin check_ilo2_health, the plugin works fine on our OpenSuSE systems but the new Ubuntu 14.04 system has issues, removing the nagios stuff and running perl, is basically this:</p>
  
  <pre><code>perl -e 'use IO::Socket::SSL qw(debug3);IO::Socket::SSL-&gt;new(SSL_hostname =&gt; "", PeerAddr=&gt;"10.0.0.1:443",  Proto=&gt;"tcp",SSL_verify_mode =&gt; SSL_VERIFY_NONE)or die $!'
  </code></pre>
  
  <p>I'm connecting to an HP ILO2 with a self signed certificate and get a reply:</p>
  
  <pre><code>DEBUG: .../IO/Socket/SSL.pm:2503: new ctx 19182624
  DEBUG: .../IO/Socket/SSL.pm:526: socket not yet connected
  DEBUG: .../IO/Socket/SSL.pm:528: socket connected
  DEBUG: .../IO/Socket/SSL.pm:550: ssl handshake not started
  DEBUG: .../IO/Socket/SSL.pm:586: not using SNI because hostname is unknown
  DEBUG: .../IO/Socket/SSL.pm:647: Net::SSLeay::connect -&gt; 0
  DEBUG: .../IO/Socket/SSL.pm:695: connection failed - connect returned 0
  DEBUG: .../IO/Socket/SSL.pm:1757: SSL connect attempt failed because of handshake problems
  DEBUG: .../IO/Socket/SSL.pm:2537: free ctx 19182624 open=19182624
  DEBUG: .../IO/Socket/SSL.pm:2549: OK free ctx 19182624
  IO::Socket::SSL: SSL connect attempt failed because of handshake problems error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac        ...propagated at -e line 1.
  </code></pre>
  
  <p>If I run it in curl:</p>
  
  <pre><code>curl "https://10.0.0.1" --insecure
  </code></pre>
  
  <p>It works returning the page from the ILO.</p>
  
  <p>I want to tell perl or openSSL to ignore any certificate problems as this is a monitoring system and a lot of the servers use self signed certificates.</p>
  
  <p>Any ideas of what can be done?</p>
  
  <p>Versions:</p>
  
  <pre><code>Perl Version: This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
  Crypt::SSLeay   0.72
  IO::Socket::SSL 1.997
  Net::SSLeay     1.66
  </code></pre>
  
  <p>Thanks in advance</p>