[Net-ssleay-devel] Strange problem with IE and Net::SSLeay
aflab at free.fr
aflab at free.fr
Thu Feb 23 12:32:00 UTC 2006
Hello,
I'm trying to write a simple HTTP/HTTPS proxy server
just for proof.
My program works great with Opera/Firefox/Safari etc..
but with IE my program
------------- snip --------------------
$ctx = Net::SSLeay::CTX_new()
or die "CTX_new $ctx : $!\n";
Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL);
Net::SSLeay::set_server_cert_and_key( $ctx, 'certs/server-cert.pem',
'certs/server-key.pem' )
or die "Problem with key and cert : $!\n";
while ( my $client = $socket->accept() )
{
my $buf;
while ( $buf = <$client> )
{
if( $buf =~ /CONNECT (.*):\d+/ )
{
print $client "HTTP/1.1 200 OK Connection established\r\n";
print $client "\r\n";
$ssl = Net::SSLeay::new( $ctx ) or die "Error during new $ssl :
$!\n";
Net::SSLeay::set_fd( $ssl, fileno($client) ) or die "Error during
fileno : $!\n";
$err = Net::SSLeay::accept( $ssl ) or die "Error during accept :
$!\n";
$buf = Net::SSLeay::ssl_read_until( $ssl, "\r\n" )
or die_if_ssl_error("SSL read $!");
print $buf;
}
}
}
--------------------------------------------
start to load to load to load
(100% of cpu usage )
And i can't read data .
If i use $Net::SSLeay::trace = 3
i've just a lot of :
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
etc...
I have changed read_until by read with random size and the result is the same
Anyone can help me ?
Thanks
More information about the Net-ssleay-devel
mailing list