I have problems with pipes. I try to use s_client as fetchmail plugin, but
something goes wrong. Transmission over ssl-tunnel will stop.

Imap server is wu-imapd tunneled with stunnel, but I can see the problem
with s_server too.

Programs are tested with sparc-solaris and x86-linux with and without asm
and optimizations. 

I hope this demonstrates the problem:

demo_client: run
openssl s_client -connect localhost:9999 and
sleep 10 ; openssl s_client -connect localhost:9999

demo_server:
#! /usr/local/bin/perl

#$ssl = "/usr/local/ssl/bin/ssleay";
$ssl = "/usr/local/ssl/bin/openssl";

$port = 9999;

if ( -e ! "key.pem" || ( -e ! "key_nopass.pem" || ! "crt.pem" )) {
    create_dummy_keys (); };

open (SSL, "|$ssl s_server -key key_nopass.pem -cert crt.pem -accept $port")
        || die "Can't open ssl";

# if client is ready to receive, everything is ok.
sleep 10;

$count = 1000;
while ($count) 
     {
       print SSL "Testing ssl, count = ", $count, "\n";
       $count --;
     }
close (SSL);
exit 0;

sub create_dummy_keys ()
{
    system ("$ssl genrsa -des 1024 > key.pem");
    system ("$ssl rsa -in key.pem -out key_nopass.pem");
    system ("$ssl req -new -x509 -key key.pem -out crt.pem");
}

-- 

        Mikko Hirvonen                  [EMAIL PROTECTED] 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to