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
4f14b030
Commit
4f14b030
authored
Nov 19, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Nov 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix failing tests on Win9x/NT4.
parent
76d25370
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
encode.c
dlls/crypt32/tests/encode.c
+21
-7
No files found.
dlls/crypt32/tests/encode.c
View file @
4f14b030
...
...
@@ -1318,9 +1318,10 @@ static void test_encodeNameValue(DWORD dwEncoding)
ret
=
pCryptEncodeObjectEx
(
dwEncoding
,
X509_NAME_VALUE
,
&
nameValues
[
i
].
value
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
ok
(
ret
,
"Type %d: CryptEncodeObjectEx failed: %08x
\n
"
,
ok
(
ret
||
broken
(
GetLastError
()
==
OSS_PDU_MISMATCH
)
/* NT4/Win9x */
,
"Type %d: CryptEncodeObjectEx failed: %08x
\n
"
,
nameValues
[
i
].
value
.
dwValueType
,
GetLastError
());
if
(
buf
)
if
(
ret
)
{
ok
(
size
==
nameValues
[
i
].
encodedSize
,
"Expected size %d, got %d
\n
"
,
nameValues
[
i
].
encodedSize
,
size
);
...
...
@@ -1346,7 +1347,7 @@ static void test_decodeNameValue(DWORD dwEncoding)
(
BYTE
*
)
&
buf
,
&
bufSize
);
ok
(
ret
,
"Value type %d: CryptDecodeObjectEx failed: %08x
\n
"
,
nameValues
[
i
].
value
.
dwValueType
,
GetLastError
());
if
(
buf
)
if
(
ret
)
{
compareNameValues
(
&
nameValues
[
i
].
value
,
(
const
CERT_NAME_VALUE
*
)
buf
);
...
...
@@ -2367,8 +2368,10 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding)
ret
=
pCryptDecodeObjectEx
(
dwEncoding
,
RSA_CSP_PUBLICKEYBLOB
,
rsaPubKeys
[
0
].
encoded
,
rsaPubKeys
[
0
].
encoded
[
1
],
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
bufSize
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
"Expected CRYPT_E_ASN1_EOD, got %08x
\n
"
,
GetLastError
());
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_EOD
||
GetLastError
()
==
OSS_MORE_INPUT
/* Win9x/NT4 */
),
"Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x
\n
"
,
GetLastError
());
/* Try with a couple of RSA-related OIDs */
ret
=
pCryptDecodeObjectEx
(
dwEncoding
,
szOID_RSA_RSA
,
rsaPubKeys
[
0
].
encoded
,
rsaPubKeys
[
0
].
encoded
[
1
]
+
2
,
...
...
@@ -7065,6 +7068,11 @@ static void test_encodePolicyQualifierUserNotice(DWORD dwEncoding)
ret
=
pCryptEncodeObjectEx
(
dwEncoding
,
X509_PKIX_POLICY_QUALIFIER_USERNOTICE
,
&
notice
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
{
skip
(
"no X509_PKIX_POLICY_QUALIFIER_USERNOTICE encode support
\n
"
);
return
;
}
ok
(
ret
,
"CryptEncodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -7109,6 +7117,11 @@ static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding)
X509_PKIX_POLICY_QUALIFIER_USERNOTICE
,
emptySequence
,
sizeof
(
emptySequence
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
notice
,
&
size
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
{
skip
(
"no X509_PKIX_POLICY_QUALIFIER_USERNOTICE decode support
\n
"
);
return
;
}
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -7196,8 +7209,9 @@ static void test_encodeCertPolicies(DWORD dwEncoding)
info
.
rgPolicyInfo
=
policy
;
ret
=
pCryptEncodeObjectEx
(
dwEncoding
,
X509_CERT_POLICIES
,
&
info
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
ok
(
!
ret
&&
(
GetLastError
()
==
E_INVALIDARG
||
GetLastError
()
==
OSS_LIMITED
/* Win9x/NT4 */
),
"expected E_INVALIDARG or OSS_LIMITED, got %08x
\n
"
,
GetLastError
());
policy
[
0
].
pszPolicyIdentifier
=
oid_any_policy
;
ret
=
pCryptEncodeObjectEx
(
dwEncoding
,
X509_CERT_POLICIES
,
&
info
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
...
...
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