[email protected] wrote:
The problem almost certainly is that your file a.txt ends in a newline.  Try 
getting rid of the newline and see what happens.
Thanks for your response!

I checked with your method, but still wrong.

[r...@amadis test]# echo -n 616263 > a.txt
[r...@amadis test]# ls -l a.txt
-rw-r--r-- 1 root root 6 2009-02-18 13:43 a.txt
[r...@amadis test]# od -c a.txt
0000000   6   1   6   2   6   3
0000006
[r...@amadis test]# openssl dgst -sha1 a.txt
SHA1(a.txt)= c3d8b80f92eaf79c90a1b99f37a62c84b1494a38

thanks,
-Derek Wang
  -- David Jacobson


--- On Tue, 2/17/09, xh <[email protected]> wrote:

From: xh <[email protected]>
Subject: errer found in file evp_test.c
To: [email protected]
Date: Tuesday, February 17, 2009, 7:40 PM
Hi everyone,

I found two errors in file evp_test.c in openssl version
openssl-0.9.8j.

223         if(outl+outl2 != cn)
I think this line should be:
if(outl+outl2 != pn)
224             {
225             fprintf(stderr,"Plaintext length
mismatch got %d expected %d\n",
226                     outl+outl2,cn);
227             test1_exit(8);
228             }
229
230         if(memcmp(out,plaintext,cn))
this should be:
if(memcmp(out,plaintext,pn))
231             {
232             fprintf(stderr,"Plaintext
mismatch\n");
233             hexdump(stderr,"Got",out,cn);
234 hexdump(stderr,"Expected",plaintext,cn);
235             test1_exit(9);
236             }

BTW, I find another strange behaviour:
take the lines at the beginning of the file evptests.txt
for example,
# SHA(1) tests (from shatest.c)
SHA1:::616263:a9993e364706816aba3e25717850c26c9cd0d89d

I think we should get the digest message via the following
command, but I failed.
#echo 616263 > a.txt
#cat a.txt
616263
# openssl dgst -sha1 a.txt
SHA1(a.txt)= 765ecbbdc9e459fee019c275fbdd589d2948a009

Could you please help me out of this problem?

Thanks in advance!

thanks,
-Derek Wang
______________________________________________________________________
OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to