Hi list,
 
   I followed the dgst.c file to write my own testing SHA1 function. There is a for loop from line 347 to 351 that BIO_reads out some data from the chained BIO, then it did the digesting at line 378, BIO_gets(). If I left out the for loop, the result is not correct, besides, the data read from the loop is the plain text to be hashed. So it seems that the chained BIOs have to be read/written one by one, that is, if there are ,say, four BIOs chained together, then we have to BIO_read/BIO_write four times to get the final result. Is it correct?
 
Best Regards,
 
LH

Reply via email to