LWP::UserAgent and 500 SSL negotiation failed

Zippy1970

I'm running an old Debian server that once a day fetches a webpage through a Perl script. Since yesterday, the script fails with a "500 SSL negotiation failed" error.

use strict;
use LWP::UserAgent;

my $browserObj = LWP::UserAgent->new();

$response = $browserObj->get( "https://www.domain.tld" );
print $response->status_line . "\n" if( ! $response->is_success );

Like I said, it's an old server running old versions of everything:

  • Perl: 5.8.8
  • OpenSSL: 0.9.8c
  • LWP: 5.805
  • Crypt::SSLeay: 0.57

I made a snapshot of the server so I could try all kinds of solutions and return to the snapshot if it fails. Which is exactly what I did after each test, return to the original server state.

Test 1: First thing I tried was updating OpenSSL to 1.0.2d. That did not help, I still got the "SSL negotiation failed" error. I then updated Crypt:SSLeay. That broke SSL altogether (caused the server to be unable to connect to any secure server).

Test 2: Updated Crypt::SSLeay without updating OpenSSL. Caused the server to unable to connect to secure servers again.

Test 3: Updated OpenSSL to 1.0.2d. Updated LWP. Made no difference. Still got "500 SSL negotiation failed"

Is there anything else I could try?

PS: For several reasons I'm unable to update Debian itself.

Zippy1970

I got it to work for Perl. As I suspected, each program on the server that uses SSL needs to be patched seperately. But this was the solution for Perl:

1) Update OpenSSL (to version 1.0.2d)

This is a necessary step for every program that uses SSL! On my Debian system, I used the instructions found here.

2) Update Net::SSLeay

This was necessary otherwise step 4) would fail.

$ cpan Net::SSLeay

3) Update Getopt::Long

Again, this step was necessary otherwise step 4) would fail.

$ cpan Getopt::Long

4) Update Crypt::SSLeay

Note that this will also update LWP.

$ cpan Crypt::SSLeay

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

perl LWP::UserAgent gives a cryptic error message

From Dev

I cannot Connect to any HTTPS site using LWP::UserAgent

From Dev

LWP::UserAgent Can't Post with TLS1.1

From Dev

how to send a http patch request with Lwp::Useragent?

From Dev

LWP::UserAgent Insists on verifying hostname

From Dev

Perl LWP GET or POST to an SNI SSL URL

From Dev

Perl LWP SSL connection: certificate verify fails

From Dev

Perl LWP::UserAgent SSL/TLS Inconsistent Certificate Error Message Issue

From Dev

LWP::UserAgent get callback with timeout

From Dev

LWP::useragent keep_alive not working

From Dev

Net:HTTP SSL negotiation timeout on Ubuntu 14.04

From Dev

How to View NodeJS SSL Negotiation Results

From Dev

Adding a .zip file to the body of an LWP::UserAgent POST request

From Dev

how to send a http patch request with Lwp::Useragent?

From Dev

500 SSL negotiation failed

From Dev

ssh algorithm negotiation failed

From Dev

Perl LWP::UserAgent SSL/TLS Inconsistent Certificate Error Message Issue

From Dev

Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

From Dev

LWP::UserAgent unable to establish 'keep-alive' connection

From Dev

Rails received invalid response to SSL Negotiation

From Dev

How to get file size before downloading the file LWP::useragent

From Dev

REST::Client vs LWP::UserAgent Perl class to access Google API?

From Dev

measuring ssl negotiation time in load testing

From Dev

Crazy Domains SMTP SSL Negotiation Fail

From Dev

Sending XML Request Tag in LWP::UserAgent

From Dev

Fix SSL negotiation failed

From Dev

Error -- KIO Client Could not connect to host ... SSL negotiation failed

From Dev

ssl negotiation happens multiple times for same domain

From Dev

LWP::UserAgent change SSL implementation

Related Related

  1. 1

    perl LWP::UserAgent gives a cryptic error message

  2. 2

    I cannot Connect to any HTTPS site using LWP::UserAgent

  3. 3

    LWP::UserAgent Can't Post with TLS1.1

  4. 4

    how to send a http patch request with Lwp::Useragent?

  5. 5

    LWP::UserAgent Insists on verifying hostname

  6. 6

    Perl LWP GET or POST to an SNI SSL URL

  7. 7

    Perl LWP SSL connection: certificate verify fails

  8. 8

    Perl LWP::UserAgent SSL/TLS Inconsistent Certificate Error Message Issue

  9. 9

    LWP::UserAgent get callback with timeout

  10. 10

    LWP::useragent keep_alive not working

  11. 11

    Net:HTTP SSL negotiation timeout on Ubuntu 14.04

  12. 12

    How to View NodeJS SSL Negotiation Results

  13. 13

    Adding a .zip file to the body of an LWP::UserAgent POST request

  14. 14

    how to send a http patch request with Lwp::Useragent?

  15. 15

    500 SSL negotiation failed

  16. 16

    ssh algorithm negotiation failed

  17. 17

    Perl LWP::UserAgent SSL/TLS Inconsistent Certificate Error Message Issue

  18. 18

    Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

  19. 19

    LWP::UserAgent unable to establish 'keep-alive' connection

  20. 20

    Rails received invalid response to SSL Negotiation

  21. 21

    How to get file size before downloading the file LWP::useragent

  22. 22

    REST::Client vs LWP::UserAgent Perl class to access Google API?

  23. 23

    measuring ssl negotiation time in load testing

  24. 24

    Crazy Domains SMTP SSL Negotiation Fail

  25. 25

    Sending XML Request Tag in LWP::UserAgent

  26. 26

    Fix SSL negotiation failed

  27. 27

    Error -- KIO Client Could not connect to host ... SSL negotiation failed

  28. 28

    ssl negotiation happens multiple times for same domain

  29. 29

    LWP::UserAgent change SSL implementation

HotTag

Archive