Fixing SSL problems with Dist::Zilla and github

I’m using Dist::Zilla extensively to test/release the Perl code I write.

I had to fix a bug on one of the modules I wrote and I ran into this error when I tried ‘dist test’ on the freshly checked out repo:

[GitHub::Meta] Getting GitHub repository info
[GitHub::Meta] Err:  SSL connection failed for api.github.com: Client side SNI not supported for this openssl

After some searching I found that IO::Socket::SSL throws this error when it tries to use openssl releases from before the 1.0 release. I’m on OS X 10.9 so this makes sense as it comes with openssl v0.9.8.

Onto homebrew to install openssl, then link it so it appears in /usr/local/bin

$ which openssl
/usr/local/bin/openssl
$ openssl version
OpenSSL 1.0.1g 7 Apr 2014

But alas, ‘dzil test’ is still not working.

Looking into the Dist::Zilla::Plugins::GitHub::Meta code I see this error originates from a HTTP::Tiny call. Now, how to tell HTTP::Tiny to use the recent openssl?

I did

cpanm IO::Socket::SSL
cpanm Net::SSLeay
cpanm Net::HTTP
cpanm HTTP::Tiny

And after the last module install all is working fine again.

I have no time to investigate this further currently, but maybe it is of use to somebody else when the same error pops up.