my $sock; print "Starting to listen on $setup{CAPSportS}\n"; if(!($sock = IO::Socket::SSL->new( Listen => 5, LocalAddr => $setup{MYaddr}, LocalPort => $setup{CAPSportS}, Proto => 'tcp', SSL_verify_mode => 0x01, SSL_cert_file => 'certs/capscert.pem', SSL_key_file => 'certs/capspk.pem', SSL_ca_file => 'certs/cacert.pem', Reuse => 1, )) ) { print "unable to create socket: ", &IO::Socket::SSL::errstr, "\n"; exit(0); } MAIN_LOOP: while ( $TRUE ) { $nn = ''; my $s; if ( ( $s = $sock->accept() ) ) { # check TCPWrappers to find out if we want to look at this my $req = request_init(RQ_DAEMON, $setup{CAPSport}, RQ_FILE, $sock->fileno()); # I've tried supplying the progname instead of the # port there if ( ! defined($req) ) { die "Bad call to request_init\n"; } fromhost($req); if ( hosts_access($req) ) { handle_one($s); }else { close($s); }