elasticsearch/elasticsearch-perl — pull request #47 by rustyconover (2014-10-14 04:31:38+00:00)
Title: Add support for ssl_options when talking to https nodes.

Add support for specifying SSL options that will be honored by LWP and HTTPTiny
this way we can support client side certificates, server certificate and
hostname verification.

Example:

my $e = Search::Elasticsearch->new(nodes => ['https://'],
ssl_options => {
verify_hostname => 1,
SSL_verifycn_name => 'server_name',
SSL_ca_file => 'ca.crt',
SSL_cert_file => 'client.all',
SSL_key_file => 'client.all'
}
);

There is one difference between HTTPTiny and LWP, where LWP requires verify_hostname
and HTTPTiny uses SSL_verify_mode from IO::Socket::SSL, this is caused by code in
LWP::Protocol::https.