On Wed, Apr 24, 2002 at 04:04:53PM +0100, Ben Laurie wrote:
> Solar Designer wrote:
> > Thank you for working on this!
> 
> OK, try the attached patch...

It's almost right, except:

> -             do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, siglen);
> +             do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, siglen,
> +                   "");

I'd use the return value in here as well, or we get:

jill!solar:~/build/openssl-SNAP-20020416$ apps/openssl dgst -md5 < /dev/log
Read Error
jill!solar:~/build/openssl-SNAP-20020416$ echo $?
0

It could also be nice to report the filename and strerror(errno), or
it is sometimes not immediately clear what the error messages apply to:

jill!solar:~/build/openssl-SNAP-20020416$ apps/openssl dgst -md5 /bin/ls /dev/log /bin 
/usr/bin/id
MD5(/bin/ls)= d93498d9f52c3dc0330ab930fe3ffc50
Read Error
Read Error
MD5(/usr/bin/id)= 4b37435d0793aba2b602fd2da0d7f8c5
jill!solar:~/build/openssl-SNAP-20020416$ echo $?
0

...and the zero exit status in that case is even worse.

I am thinking something like "fread: /bin: Is a directory" printed to
stderr and a non-zero exit if at least one of the arguments resulted in
an error.

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

Reply via email to