[Net-ssleay-devel] client read failure via inetd
Charles DeRykus
ced at blv-sam-01.ca.boeing.com
Thu Sep 28 00:50:30 UTC 2006
> I've done extensive searchs but can't find any more
> debugging hints/suggestions for a Net::SSLeay simple
> echo server running from inetd.
> The server log indicates that it receives the client msg,
> writes the msg back, and then does a successful shutdown.
> However, the client dies silently reading the reply:
> [ client code ]
> #!/usr/perl-5.8.7/bin/perl
> use Socket; # 1.77
> use Net::SSLeay qw/die_if_ssl_error/ # 1.30;
# Solaris 5.8/OpenSSL 0.9.6g
> ...
> my $msg = 'This is a test message from the client';
> Net::SSLeay::write( $ssl, $msg );
> die_if_ssl_error("ssl write");
> CORE::shutdown( SOCKET, 1 ); #-- half close: "I've stopped writing"
> if ($DEBUG) { print LOG "shutdown complete...\n"; }
> my $got = Net::SSLeay::read( $ssl ); #
> die_if_ssl_error("ssl cliet read error");
> if ($DEBUG) { print LOG "client read complete: $got\n"; )
> ...
> "shutdown complete" is the final msg in the client log.
[ I forgot to mention that the same client and a server not running
via inetd work fine. }
Just tinkered with the existing client/server code:
1. used higher level ssl_read_all and ssl_write_all calls
2. commented out client shutdown call
Result debug:
wrote to server: 'This is a test message from the client'
write_all VM at entry=vm_unknown
written so far 38:38 bytes (VM=vm_unknown)
client read...
SSL_read 8801: 1 - error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version
number
server replied:
client teardown..
Any ideas/suggestions appreciated.
Rgds,
--
Charles DeRykus
More information about the Net-ssleay-devel
mailing list