Hi all,

I have a problem while writing a PERL module. When I want to issue an
openssl command (that requires input) the following code (which works
in common PERL programs) does not pass the required input to openssl
so it waits for user input:

        open(FD, "|$command" ) || return;
                ## Send Password
                print FD "$passwd\n";

                ## Send Confirmation Password
                print FD "$passwd\n";
        close(FD);

Where command is, for example:

        /usr/local/ssl/bin/openssl genrsa -des3 -out priv.key 512

The output I get is:

        Generating RSA private key, 512 bit long modulus
        ...++++++++++++
        .........++++++++++++
        e is 65537 (0x10001)
        Enter PEM pass phrase:

but it should not hang asking for passwd as I pass it to openssl with
the print command. What's wrong here in ??

C'you,

        Massimiliano Pala ([EMAIL PROTECTED])

S/MIME Cryptographic Signature

Reply via email to