crypt32(2/2): Remove bad special case...
Juan Lang
juan.lang at gmail.com
Tue Jul 31 17:00:47 CDT 2007
it isn't necessary since the outer content specifies the hash algorithm
--Juan
-------------- next part --------------
From 9599ed6b0306c9d4be036e99339a751c6f53c141 Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Tue, 31 Jul 2007 14:59:04 -0700
Subject: [PATCH] Remove bad special case, it isn't necessary since the outer content specifies
the hash algorithm
---
dlls/crypt32/cert.c | 31 +++++--------------------------
1 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index de1d5e0..940778d 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -1353,37 +1353,16 @@ static BOOL CRYPT_VerifyCertSignatureFro
info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY,
signedCert->SignatureAlgorithm.pszObjId, 0);
- if (!info || (info->dwGroupId != CRYPT_PUBKEY_ALG_OID_GROUP_ID &&
- info->dwGroupId != CRYPT_SIGN_ALG_OID_GROUP_ID))
+ if (!info || info->dwGroupId != CRYPT_SIGN_ALG_OID_GROUP_ID)
{
SetLastError(NTE_BAD_ALGID);
return FALSE;
}
- if (info->dwGroupId == CRYPT_PUBKEY_ALG_OID_GROUP_ID)
- {
- switch (info->u.Algid)
- {
- case CALG_RSA_KEYX:
- pubKeyID = CALG_RSA_SIGN;
- hashID = CALG_SHA1;
- break;
- case CALG_RSA_SIGN:
- pubKeyID = CALG_RSA_SIGN;
- hashID = CALG_SHA1;
- break;
- default:
- FIXME("unimplemented for %s\n", pubKeyInfo->Algorithm.pszObjId);
- return FALSE;
- }
- }
+ hashID = info->u.Algid;
+ if (info->ExtraInfo.cbData >= sizeof(ALG_ID))
+ pubKeyID = *(ALG_ID *)info->ExtraInfo.pbData;
else
- {
- hashID = info->u.Algid;
- if (info->ExtraInfo.cbData >= sizeof(ALG_ID))
- pubKeyID = *(ALG_ID *)info->ExtraInfo.pbData;
- else
- pubKeyID = hashID;
- }
+ pubKeyID = hashID;
/* Load the default provider if necessary */
if (!hCryptProv)
hCryptProv = CRYPT_GetDefaultProvider();
--
1.4.1
More information about the wine-patches
mailing list