Skip to content

Commit 304bc49

Browse files
committed
Fixed SSL_verify_mode in LWP and skipped https tests for Hijk
1 parent 8787994 commit 304bc49

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/Search/Elasticsearch/Cxn/LWP.pm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ sub perform_request {
2828
$headers{'Content-Encoding'} = $params->{encoding}
2929
if $params->{encoding};
3030
}
31-
3231
my $request = HTTP::Request->new(
3332
$method => $uri,
3433
[ %headers, %{ $self->default_headers }, ],
3534
$params->{data}
3635
);
37-
3836
my $ua = $self->handle;
3937
my $timeout = $params->{timeout} || $self->request_timeout;
4038
if ( $timeout ne $ua->timeout ) {
@@ -76,7 +74,7 @@ sub _build_handle {
7674
$args{ssl_opts}
7775
= $self->has_ssl_options
7876
? $self->ssl_options
79-
: { verify_hostname => 0 };
77+
: { verify_hostname => 0, SSL_verify_mode => 0x00 };
8078
}
8179
return LWP::UserAgent->new( %args, %{ $self->handle_args } );
8280
}

t/Client_6_0/22_fork_hijk.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
use Test::More;
12
use lib 't/lib';
23

4+
if ($ENV{ES} =~ /https/) {
5+
plan skip_all => 'Hijk does not support SSL';
6+
}
37
$ENV{ES_VERSION} = '6_0';
48
$ENV{ES_CXN} = 'Hijk';
59
do "es_sync_fork.pl" or die( $@ || $! );
610

11+
done_testing;

0 commit comments

Comments
 (0)