Loading ...
Sorry, an error occurred while loading the content.

SSL Daemon + ForkOnAccept

Expand Messages
  • Nils Sowen
    Hi everybody, I figured out another problem concerning the SSL-Daemon mode. When I use the ForkOnAccept module from the examples directory, I get errors only.
    Message 1 of 1 , Jan 24, 2005
    • 0 Attachment
      Hi everybody,

      I figured out another problem concerning the SSL-Daemon mode.
      When I use the ForkOnAccept module from the examples directory,
      I get errors only. That's because IO::Socket::SSL uses a different
      concept when working on "socket-copies". SSL needs a "close notify"
      before closing sockets, otherwise you'll run into problems.

      Just replace every close() with close(SSL_no_shutdown => 1). See
      IO::Socket::SSL manpage for details.

      PATCH (ForkOnAccept.pm)
      =======================
      22c22
      < $c->close;
      ---
      > $c->close(SSL_no_shutdown=>1);
      27c27
      < $self->close; # Close the listening socket (always done in
      children)
      ---
      > $self->close(SSL_no_shutdown=>1); # Close the listening socket
      (always done in children)
      35c35
      < $c->close;
      ---
      > $c->close(SSL_no_shutdown=>1);
      =======================

      Bye,
      Nils Sowen
    Your message has been successfully submitted and would be delivered to recipients shortly.