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]