Changeset 33062 in vbox
- Timestamp:
- Oct 12, 2010 12:47:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImplIO.cpp
r33060 r33062 32 32 #include <iprt/stream.h> 33 33 #include <VBox/VBoxHDD.h> 34 35 #include <openssl/sha.h>36 34 37 35 /****************************************************************************** … … 84 82 RTSEMEVENT calcFinishedEvent; 85 83 /** SHA1 calculation context. */ 86 SHA_CTXctx;84 RTSHA1CONTEXT ctx; 87 85 } SHA1STORAGEINTERNAL, *PSHA1STORAGEINTERNAL; 88 86 … … 441 439 { 442 440 /* Update the SHA1 context with the next data block. */ 443 if(!SHA1_Update(&pInt->ctx, pInt->pcBuf, pInt->cbCurBuf)) 444 { 445 rc = VERR_INTERNAL_ERROR; 446 fLoop = false; 447 } 441 RTSha1Update(&pInt->ctx, pInt->pcBuf, pInt->cbCurBuf); 448 442 /* Reset the thread status and signal the main thread that we 449 443 are finished. */ … … 569 563 { 570 564 /* Create a sha1 context the sha1 worker thread will work with. */ 571 if (!SHA1_Init(&pInt->ctx)) 572 { 573 rc = VERR_INTERNAL_ERROR; 574 break; 575 } 565 RTSha1Init(&pInt->ctx); 576 566 /* Create an event semaphore to indicate a state change for the sha1 577 567 worker thread. */ … … 651 641 unsigned char auchDig[RTSHA1_HASH_SIZE]; 652 642 char *pszDigest; 653 if (!SHA1_Final(auchDig, &pInt->ctx)) 654 rc = VERR_INTERNAL_ERROR; 643 RTSha1Final(&pInt->ctx, auchDig); 655 644 rc = RTStrAllocEx(&pszDigest, RTSHA1_DIGEST_LEN + 1); 656 645 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.