Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
36d01401
Commit
36d01401
authored
Oct 17, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Implement WVTAsn1CatNameValueDecode.
parent
e009cd90
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
asn.c
dlls/wintrust/asn.c
+28
-2
asn.c
dlls/wintrust/tests/asn.c
+0
-4
No files found.
dlls/wintrust/asn.c
View file @
36d01401
...
@@ -2095,7 +2095,33 @@ BOOL WINAPI WVTAsn1CatNameValueDecode(DWORD dwCertEncodingType,
...
@@ -2095,7 +2095,33 @@ BOOL WINAPI WVTAsn1CatNameValueDecode(DWORD dwCertEncodingType,
LPCSTR
lpszStructType
,
const
BYTE
*
pbEncoded
,
DWORD
cbEncoded
,
DWORD
dwFlags
,
LPCSTR
lpszStructType
,
const
BYTE
*
pbEncoded
,
DWORD
cbEncoded
,
DWORD
dwFlags
,
void
*
pvStructInfo
,
DWORD
*
pcbStructInfo
)
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
);
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
;
}
}
dlls/wintrust/tests/asn.c
View file @
36d01401
...
@@ -663,7 +663,6 @@ static void test_decodeCatNameValue(void)
...
@@ -663,7 +663,6 @@ static void test_decodeCatNameValue(void)
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
emptyCatNameValue
,
sizeof
(
emptyCatNameValue
),
emptyCatNameValue
,
sizeof
(
emptyCatNameValue
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
if
(
ret
)
{
{
...
@@ -678,7 +677,6 @@ static void test_decodeCatNameValue(void)
...
@@ -678,7 +677,6 @@ static void test_decodeCatNameValue(void)
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
catNameValueWithTag
,
sizeof
(
catNameValueWithTag
),
catNameValueWithTag
,
sizeof
(
catNameValueWithTag
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
if
(
ret
)
{
{
...
@@ -694,7 +692,6 @@ static void test_decodeCatNameValue(void)
...
@@ -694,7 +692,6 @@ static void test_decodeCatNameValue(void)
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
catNameValueWithFlags
,
sizeof
(
catNameValueWithFlags
),
catNameValueWithFlags
,
sizeof
(
catNameValueWithFlags
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
if
(
ret
)
{
{
...
@@ -709,7 +706,6 @@ static void test_decodeCatNameValue(void)
...
@@ -709,7 +706,6 @@ static void test_decodeCatNameValue(void)
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
catNameValueWithValue
,
sizeof
(
catNameValueWithValue
),
catNameValueWithValue
,
sizeof
(
catNameValueWithValue
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
if
(
ret
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment