miyagawa / Starman

Starman is a high-performance preforking Perl PSGI web server
http://search.cpan.org/dist/Starman
Other
287 stars 84 forks source link

IO::Socket::SSL-based SSL support, based on overhauled ::Proto::SSL in Net::Server 2.0 series #77

Closed ap closed 11 years ago

ap commented 11 years ago

The previous patches all used ::Proto::SSLEAY because ::Proto::SSL was discouraged in Net::Server 0.9 series due to limitations in using IO::Socket::SSL. In 2.0 series those limitations were lifted. And the Net::SSLeay wrapping in IO::Socket::SSL seems more mature than that in Net::Server::Proto::SSLEAY.

So unlike ::Proto::SSLEAY, using ::Proto::SSL as a drop-in replacement for ::Proto::TCP seems to Just Work. I did some light testing using this patch and did not spot issues.

But please put it through its paces.

This patch also takes advantage of improved Net::Server 2.0 config interface (allows passing an array of hashes for the port key) to make the command line parsing code much nicer to skim.

Cc @og01 @und3f @alladdin @exodist @dpetrov

karenetheridge commented 11 years ago

this is awesome!

exodist commented 11 years ago

I would love to see a release with this....

ap commented 11 years ago

Now with tests stolen from Twiggy::TLS.

ap commented 11 years ago

Now with the improved command line parsing code broken out as a separate preparatory commit.

ap commented 11 years ago

I’ve broken out a few further commits. Each of them improves style a bit by itself, and each of them can be accepted independently of the commits after it. This also leaves it obvious how little added code the SSL support itself really involves.