X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b04fe171f0375ecd5d8a24747ca1dff85720a0ca..6b200bc335dc93c5516ccb52f14bd896d8c7fad7:/SecurityTests/clxutils/threadTest/digestClient.cpp?ds=inline diff --git a/SecurityTests/clxutils/threadTest/digestClient.cpp b/SecurityTests/clxutils/threadTest/digestClient.cpp deleted file mode 100644 index 92f1001a..00000000 --- a/SecurityTests/clxutils/threadTest/digestClient.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * digestClient.cpp - */ -#include "testParams.h" -#include -#include - -/* for malloc debug */ -#define DO_PAUSE 0 - -int digestClientInit(TestParams *testParams) -{ - return 0; -} - -using namespace Security; -using namespace CssmClient; - -int digestClient(TestParams *testParams) -{ - unsigned loopNum; - - for(loopNum=0; loopNumnumLoops; loopNum++) { - if(testParams->verbose) { - printf("secTrustEval loop %d\n", loopNum); - } - else if(!testParams->quiet) { - printChar(testParams->progressChar); - } - try { - CSP *csp = new CSP(gGuidAppleCSP); - uint8 digData[20]; - Digest *digest = new Digest(*csp, CSSM_ALGID_SHA1); - CssmData ptext((char *)"test", 4); - CssmData dig(digData, sizeof(digData)); - digest->digest(ptext, dig); - if(dig.Length != 20) { - printf("***digest length error\n"); - return 1; - } - delete digest; - delete csp; - } - catch(...) { - printf("***CSP/Digest client threw exeption\n"); - return 1; - } - - #if DO_PAUSE - fpurge(stdin); - printf("Hit CR to continue: "); - getchar(); - #endif - } /* outer loop */ - #if HOLD_SEARCH_LIST - CFRelease(sl); - #endif - return 0; -}