fix Signer hash size w/o SHA, fix GetCA caList b4 lock

pull/1/head
toddouska 2013-04-25 14:47:09 -07:00
parent 98b7ed9d47
commit 9dbf6a5e10
2 changed files with 3 additions and 2 deletions

View File

@ -282,7 +282,7 @@ struct DecodedCert {
#ifdef SHA_DIGEST_SIZE
#define SIGNER_DIGEST_SIZE SHA_DIGEST_SIZE
#else
#define SIGNER_DIGEST_SIZE 160
#define SIGNER_DIGEST_SIZE 20
#endif
/* CA Signers */

View File

@ -882,10 +882,11 @@ Signer* GetCA(void* vp, byte* hash)
if (cm == NULL)
return NULL;
signers = cm->caList;
if (LockMutex(&cm->caLock) != 0)
return ret;
signers = cm->caList;
while (signers) {
if (XMEMCMP(hash, signers->hash, SHA_DIGEST_SIZE) == 0) {
ret = signers;