[Net-ssleay-devel] Strange problem with IE and Net::SSLeay
Mike McCauley
mikem at open.com.au
Thu Feb 23 22:58:31 UTC 2006
Hello,
I havent been able to reproduce this problem, but since you did not post your
entire program, I cant be sure if we are doing things the same way.
Also, you dont mention which version of net_ssleay or openssl you are using.
I see some potential bugs in your program if you are not using paragraph mode
to read the socket.
Cheers.
On Thursday 23 February 2006 22:32, aflab at free.fr wrote:
> 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
>
> _______________________________________________
> Net-ssleay-devel mailing list
> Net-ssleay-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/net-ssleay-devel
--
Mike McCauley mikem at open.com.au
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP etc on Unix, Windows, MacOS, NetWare etc.
More information about the Net-ssleay-devel
mailing list