Commit 19fd9872 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Get rid of encoding type from AsnDecodeSequenceItems, it's never checked.

parent 21246938
...@@ -315,10 +315,9 @@ struct AsnDecodeSequenceItem ...@@ -315,10 +315,9 @@ struct AsnDecodeSequenceItem
* Upon decoding, *cbDecoded is the total number of bytes decoded. * Upon decoding, *cbDecoded is the total number of bytes decoded.
* Each item decoder is never called with CRYPT_DECODE_ALLOC_FLAG set. * Each item decoder is never called with CRYPT_DECODE_ALLOC_FLAG set.
*/ */
static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType, static BOOL CRYPT_AsnDecodeSequenceItems(struct AsnDecodeSequenceItem items[],
struct AsnDecodeSequenceItem items[], DWORD cItem, const BYTE *pbEncoded, DWORD cItem, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, BYTE *nextData, void *pvStructInfo, BYTE *nextData, DWORD *cbDecoded)
DWORD *cbDecoded)
{ {
BOOL ret; BOOL ret;
DWORD i, decoded = 0; DWORD i, decoded = 0;
...@@ -353,7 +352,7 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType, ...@@ -353,7 +352,7 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
TRACE("decoding item %d\n", i); TRACE("decoding item %d\n", i);
else else
TRACE("sizing item %d\n", i); TRACE("sizing item %d\n", i);
ret = items[i].decodeFunc(dwCertEncodingType, ret = items[i].decodeFunc(X509_ASN_ENCODING,
NULL, ptr, 1 + nextItemLenBytes + nextItemLen, NULL, ptr, 1 + nextItemLenBytes + nextItemLen,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL,
pvStructInfo ? (BYTE *)pvStructInfo + items[i].offset pvStructInfo ? (BYTE *)pvStructInfo + items[i].offset
...@@ -463,8 +462,8 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType, ...@@ -463,8 +462,8 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
ret = FALSE; ret = FALSE;
} }
else else
ret = CRYPT_AsnDecodeSequenceItems(dwFlags, items, cItem, ptr, ret = CRYPT_AsnDecodeSequenceItems(items, cItem,
cbEncoded, dwFlags, NULL, NULL, &cbDecoded); ptr, cbEncoded, dwFlags, NULL, NULL, &cbDecoded);
if (ret && cbDecoded != dataLen) if (ret && cbDecoded != dataLen)
{ {
TRACE("expected %d decoded, got %d, failing\n", dataLen, TRACE("expected %d decoded, got %d, failing\n", dataLen,
...@@ -497,7 +496,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType, ...@@ -497,7 +496,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
else else
nextData = (BYTE *)pvStructInfo + structSize; nextData = (BYTE *)pvStructInfo + structSize;
memset(pvStructInfo, 0, structSize); memset(pvStructInfo, 0, structSize);
ret = CRYPT_AsnDecodeSequenceItems(dwFlags, items, cItem, ret = CRYPT_AsnDecodeSequenceItems(items, cItem,
ptr, cbEncoded, dwFlags, pvStructInfo, nextData, ptr, cbEncoded, dwFlags, pvStructInfo, nextData,
&cbDecoded); &cbDecoded);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment