Webinject
Webinject copied to clipboard
SSL connect attempt failed
Webinject version: 1.94 Getting the following error in a test case running on RHEL server:
Content-Type: text/plain Client-Date: Thu, 16 May 2019 10:06:25 GMT Client-Warning: Internal response 500 Can't connect to xxx.xxx.xxx (SSL connect attempt failed)
And when using the GUI on a windows machine using the same test case getting 500 SSL negotiation failed
I had the same problem. Webinject would not connect to a TLS 1.2 server.
This change allowed the connection to work:
Webinject.pm
--- a/Webinject/lib/Webinject.pm
+++ b/Webinject/lib/Webinject.pm
@@ -622,7 +622,13 @@ sub _get_useragent {
}
}
}
- my $useragent = LWP::UserAgent->new(keep_alive=>$keepalive);
+ my $useragent = LWP::UserAgent->new(
+ keep_alive=>$keepalive,
+ ssl_opts => {
+ verify_hostname => 0,
+ }
+ );
+