I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-05-11 07:21:03-07 by martinw in response to 433
Re: accept() blocks until ssl session is started
Hi *, Peter Behroozi gave me the tip to solve the problem (Thanks, Peter!).
The inital Socket must be opened as an INET socket like:
my $socket = IO::Socket::INET->new( LocalPort => $port, Listen => 10, Reuse => 1 ) or die "Cannot open socket: $!";
The SSL session than starts after the fork command:
while (my $c = $socket->accept) { print "ACCEPT\n"; my $pid = fork(); defined $pid || die "Cannot fork: $!"; next if $pid; IO::Socket::SSL->start_SSL($c, SSL_key_file => '/home/martin/test.key', SSL_cert_file => '/home/martin/test.crt', SSL_use_cert => 1, SSL_server => 1, SSL_cipher_list => 'ALL', ); ...
Now, the daemon will not block after a connect from client without doing the SSL handshake. Regards,
martin!
Direct Responses: Write a response