wintrust: Implement WVTAsn1CatNameValueDecode.
This commit is contained in:
parent
e009cd9039
commit
36d01401dc
|
@ -2095,7 +2095,33 @@ BOOL WINAPI WVTAsn1CatNameValueDecode(DWORD dwCertEncodingType,
|
|||
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
|
||||
void *pvStructInfo, DWORD *pcbStructInfo)
|
||||
{
|
||||
FIXME("(%p, %d, %08x, %p, %d): stub\n", pbEncoded, cbEncoded, dwFlags,
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo);
|
||||
return FALSE;
|
||||
|
||||
__TRY
|
||||
{
|
||||
struct AsnDecodeSequenceItem items[] = {
|
||||
{ ASN_BMPSTRING, offsetof(CAT_NAMEVALUE, pwszTag),
|
||||
CRYPT_AsnDecodeBMPString, sizeof(LPWSTR), FALSE, TRUE,
|
||||
offsetof(CAT_NAMEVALUE, pwszTag), 0 },
|
||||
{ ASN_INTEGER, offsetof(CAT_NAMEVALUE, fdwFlags),
|
||||
CRYPT_AsnDecodeInt, sizeof(DWORD), FALSE, FALSE, 0, 0 },
|
||||
{ ASN_OCTETSTRING, offsetof(CAT_NAMEVALUE, Value),
|
||||
CRYPT_AsnDecodeOctets, sizeof(CRYPT_DER_BLOB), FALSE, TRUE,
|
||||
offsetof(CAT_NAMEVALUE, Value.pbData), 0 },
|
||||
};
|
||||
|
||||
ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items,
|
||||
sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, pcbStructInfo, NULL);
|
||||
}
|
||||
__EXCEPT_PAGE_FAULT
|
||||
{
|
||||
SetLastError(STATUS_ACCESS_VIOLATION);
|
||||
}
|
||||
__ENDTRY
|
||||
TRACE("returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -663,7 +663,6 @@ static void test_decodeCatNameValue(void)
|
|||
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
|
||||
emptyCatNameValue, sizeof(emptyCatNameValue),
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
|
||||
todo_wine
|
||||
ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
|
@ -678,7 +677,6 @@ static void test_decodeCatNameValue(void)
|
|||
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
|
||||
catNameValueWithTag, sizeof(catNameValueWithTag),
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
|
||||
todo_wine
|
||||
ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
|
@ -694,7 +692,6 @@ static void test_decodeCatNameValue(void)
|
|||
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
|
||||
catNameValueWithFlags, sizeof(catNameValueWithFlags),
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
|
||||
todo_wine
|
||||
ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
|
@ -709,7 +706,6 @@ static void test_decodeCatNameValue(void)
|
|||
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
|
||||
catNameValueWithValue, sizeof(catNameValueWithValue),
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
|
||||
todo_wine
|
||||
ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue