|
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!
|