[Net-IMAP-Server] [rt.cpan.org #50150] Net::IMAP::Server - paths to SSL certificate and key

Alex Vandiver alexmv at bestpractical.com
Fri Oct 16 00:13:52 EDT 2009


On Fri, 2009-10-02 at 10:06 -0400, Alex Vandiver wrote:
> Thanks!  I'm about to head on a short vacation, so I'll review them over
> the weekend and get back to you.

Sorry to have taken longer than expected to get back to you.  The
problem with these patches it that they make plain ol' Net::Server::Coro
fall down.  Specifically, this hunk:

----------------8<-----------------
diff --git a/perl/Net/Server/Coro.pm b/perl/Net/Server/Coro.pm
index cf8633b..204849c 100644
--- a/perl/Net/Server/Coro.pm
+++ b/perl/Net/Server/Coro.pm
@@ -46,7 +46,8 @@ sub post_bind_hook {
     my $self = shift;
     my $prop = $self->{server};
     delete $prop->{select};
-    $prop->{sock} = [ map { make_coro_socket($_) } @{ $prop->{sock} } ];
+
+    $prop->{sock} = [ map { make_coro_socket($_, $self->server_cert, $self->server_key) } @{ $prop->{sock} } ];
 }
 
 =head2 make_coro_socket SOCKET
----------------8<----------------- 

...only works if the Net::Server::Coro object has ->server_cert and
->server_key methods -- which Net::IMAP::Server has, but
Net::Server::Coro doesn't.  The right answer is _probably_ to push those
methods down onto Net::Server::Coro, but I'm open to other suggestions
as well.

  Thanks for taking the time to put these patches together!  I notice
from the diff header that you're using git -- if you want to produce
patches by comitting them to your local git clone and running `git
format-patch origin/master`, it'll correctly preserve your authorship
information and commit messages when I commit it.
 - Alex



More information about the Net-IMAP-Server mailing list