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
86e2f94e
Commit
86e2f94e
authored
Dec 11, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't claim to have queried an object as a serialized context when reading it has failed.
parent
2b384cb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
object.c
dlls/crypt32/object.c
+3
-0
object.c
dlls/crypt32/tests/object.c
+3
-3
No files found.
dlls/crypt32/object.c
View file @
86e2f94e
...
...
@@ -163,6 +163,7 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
if
(
!
ret
)
return
FALSE
;
ret
=
FALSE
;
context
=
CRYPT_ReadSerializedElement
(
blob
->
pbData
,
blob
->
cbData
,
CERT_STORE_ALL_CONTEXT_FLAG
,
&
contextType
);
if
(
context
)
...
...
@@ -563,6 +564,8 @@ BOOL WINAPI CryptQueryObject(DWORD dwObjectType, const void *pvObject,
dwExpectedContentTypeFlags
,
pdwMsgAndCertEncodingType
,
pdwContentType
,
phCertStore
,
phMsg
);
}
if
(
!
ret
)
SetLastError
(
CRYPT_E_NO_MATCH
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
dlls/crypt32/tests/object.c
View file @
86e2f94e
...
...
@@ -152,13 +152,13 @@ static void test_query_object(void)
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_ALL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
,
"CryptQueryObject failed: %08x
\n
"
,
GetLastError
());
/* The same base64-encoded cert, restricting the format types */
SetLastError
(
0xdeadbeef
);
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_BINARY
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_NO_MATCH
,
"expected CRYPT_E_NO_MATCH, got %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
@@ -174,7 +174,6 @@ static void test_query_object(void)
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_ALL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_NO_MATCH
,
"expected CRYPT_E_NO_MATCH, got %08x
\n
"
,
GetLastError
());
/* For brevity, not tested here, but tested on Windows: same failure
...
...
@@ -195,6 +194,7 @@ static void test_query_object(void)
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_ALL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
,
"CryptQueryObject failed: %08x
\n
"
,
GetLastError
());
/* A valid signed message, encoded as a wide character base64 string, can
* be queried successfully.
...
...
@@ -205,12 +205,12 @@ static void test_query_object(void)
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_ALL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
,
"CryptQueryObject failed: %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_BLOB
,
&
blob
,
CERT_QUERY_CONTENT_FLAG_ALL
,
CERT_QUERY_FORMAT_FLAG_BINARY
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_NO_MATCH
,
"expected CRYPT_E_NO_MATCH, got %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
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