Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
74b91cb2
Commit
74b91cb2
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 WVTAsn1CatNameValueEncode.
parent
1f6a67d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
asn.c
dlls/wintrust/asn.c
+22
-2
asn.c
dlls/wintrust/tests/asn.c
+0
-4
No files found.
dlls/wintrust/asn.c
View file @
74b91cb2
...
...
@@ -911,9 +911,29 @@ BOOL WINAPI WVTAsn1CatNameValueEncode(DWORD dwCertEncodingType,
LPCSTR
lpszStructType
,
const
void
*
pvStructInfo
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
{
FIXME
(
"(0x%08x, %s, %p, %p, %p): stub
\n
"
,
dwCertEncodingType
,
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
return
FALSE
;
__TRY
{
const
CAT_NAMEVALUE
*
value
=
(
const
CAT_NAMEVALUE
*
)
pvStructInfo
;
struct
AsnEncodeSequenceItem
items
[]
=
{
{
value
->
pwszTag
,
CRYPT_AsnEncodeBMPString
,
0
},
{
&
value
->
fdwFlags
,
CRYPT_AsnEncodeInt
,
0
},
{
&
value
->
Value
,
CRYPT_AsnEncodeOctets
,
0
},
};
ret
=
CRYPT_AsnEncodeSequence
(
X509_ASN_ENCODING
,
items
,
sizeof
(
items
)
/
sizeof
(
items
[
0
]),
pbEncoded
,
pcbEncoded
);
}
__EXCEPT_PAGE_FAULT
{
SetLastError
(
STATUS_ACCESS_VIOLATION
);
}
__ENDTRY
return
ret
;
}
/* Gets the number of length bytes from the given (leading) length byte */
...
...
dlls/wintrust/tests/asn.c
View file @
74b91cb2
...
...
@@ -607,7 +607,6 @@ static void test_encodeCatNameValue(void)
memset
(
&
value
,
0
,
sizeof
(
value
));
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
(
LPBYTE
)
&
value
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -619,7 +618,6 @@ static void test_encodeCatNameValue(void)
value
.
pwszTag
=
foo
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
(
LPBYTE
)
&
value
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -632,7 +630,6 @@ static void test_encodeCatNameValue(void)
value
.
fdwFlags
=
0xf00dd00d
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
(
LPBYTE
)
&
value
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -646,7 +643,6 @@ static void test_encodeCatNameValue(void)
value
.
Value
.
pbData
=
aVal
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
CAT_NAMEVALUE_STRUCT
,
(
LPBYTE
)
&
value
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08x
\n
"
,
GetLastError
());
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