Could it be a problem with file and directory rights or path settings?
Try using full path for openssl and the input and output files.

Best regards,
Reiner.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Adamski
> Sent: Wednesday, September 13, 2000 08:28
> To: [EMAIL PROTECTED]
> Subject: Problem with openssl smime command from within Perl cgi
> 
> 
> I have created a perl script as follows:
> 
> ------------
> #!/usr/local/bin/perl
> require 'cgi-lib.pl';
> 
> $what = `openssl smime -encrypt -in infile.txt -from [EMAIL PROTECTED] \
>         \ -to [EMAIL PROTECTED] -subject "Encrypted message" -des3 \
>         \ -out outfile.msg you.pem`;
> 
> print &PrintHeader;
> print '<HTML><HEAD><TITLE>Did it work?</TITLE></HEAD><BODY><H1>Did it
> work?<BR></H1>';
> print $what;
> print '</BODY></HTML>';
> ------------
> 
> In my program, the $what = `...` line is all on one line, split here for
> ease of reading.
> 
> >>From the command prompt, the file works wonderfully.  It produces the needed
> sendmail ready file as outfile.msg.
> 
> When executed through the web as a cgi program, the program executes with no
> errors, displaying the page as it should with $what == "" telling me that
> the command was sent with no problem.
> But when I check the output, the outfile.msg is created but it is 0 bytes in
> size.  No actual output is written to the file.  It all seems that the
> command is being called just fine, but the output isn't being written fully.
> 
> I've tried the following combination with the exact same results:
> 
> -----------
> #!/usr/local/bin/perl
> require 'cgi-lib.pl';
> 
> $command = 'openssl smime -encrypt -in infile.txt -from [EMAIL PROTECTED] \
>         \ -to [EMAIL PROTECTED] -subject "Encrypted message" -des3 -out \
>         \ outfile.msg you.pem';
> 
> system $command;
> print &PrintHeader;
> print '<HTML><HEAD><TITLE>Did it work?</TITLE></HEAD><BODY><H1>Did it
> work?<BR></H1>';
> print '</BODY></HTML>';
> ------------
> 
> 
> Does anyone have any ideas as to what problem I'm running into?
> 
> I appreciate your help.
> 
> Thanks,
> 
> -David Adamski
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to