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
15b19f1d
Commit
15b19f1d
authored
Sep 17, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add a test of an indefinite-length sequence.
parent
716a7405
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
encode.c
dlls/crypt32/tests/encode.c
+15
-0
No files found.
dlls/crypt32/tests/encode.c
View file @
15b19f1d
...
...
@@ -979,6 +979,7 @@ static void compareNames(const CERT_NAME_INFO *expected,
}
}
static
const
BYTE
emptyIndefiniteSequence
[]
=
{
0x30
,
0x80
,
0x00
,
0x00
};
static
const
BYTE
twoRDNsExtraBytes
[]
=
{
0x30
,
0x23
,
0x31
,
0x21
,
0x30
,
0x0c
,
0x06
,
0x03
,
0x55
,
0x04
,
0x04
,
0x13
,
0x05
,
0x4c
,
0x61
,
0x6e
,
0x67
,
0x00
,
0x30
,
0x11
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
...
...
@@ -1010,6 +1011,20 @@ static void test_decodeName(DWORD dwEncoding)
((
CERT_NAME_INFO
*
)
buf
)
->
cRDN
);
LocalFree
(
buf
);
}
/* test empty name with indefinite-length encoding */
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_NAME
,
emptyIndefiniteSequence
,
sizeof
(
emptyIndefiniteSequence
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
bufSize
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
bufSize
==
sizeof
(
CERT_NAME_INFO
),
"Wrong bufSize %d
\n
"
,
bufSize
);
ok
(((
CERT_NAME_INFO
*
)
buf
)
->
cRDN
==
0
,
"Expected 0 RDNs in empty info, got %d
\n
"
,
((
CERT_NAME_INFO
*
)
buf
)
->
cRDN
);
LocalFree
(
buf
);
}
/* test empty RDN */
bufSize
=
0
;
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_NAME
,
emptyRDNs
,
...
...
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