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
2ffc042e
Commit
2ffc042e
authored
Jan 27, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jan 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement PFXIsPFXBlob.
parent
71279856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
crypt32.spec
dlls/crypt32/crypt32.spec
+1
-0
decode.c
dlls/crypt32/decode.c
+35
-0
No files found.
dlls/crypt32/crypt32.spec
View file @
2ffc042e
...
...
@@ -219,6 +219,7 @@
@ stdcall PFXExportCertStore(ptr ptr ptr long)
@ stdcall PFXExportCertStoreEx(ptr ptr ptr ptr long)
@ stub PFXImportCertStore
@ stdcall PFXIsPFXBlob(ptr)
@ stub RegCreateHKCUKeyExU
@ stub RegCreateKeyExU
@ stub RegDeleteValueU
...
...
dlls/crypt32/decode.c
View file @
2ffc042e
...
...
@@ -5511,3 +5511,38 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
TRACE_
(
crypt
)(
"returning %d
\n
"
,
ret
);
return
ret
;
}
BOOL
WINAPI
PFXIsPFXBlob
(
CRYPT_DATA_BLOB
*
pPFX
)
{
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
pPFX
);
/* A PFX blob is an asn.1-encoded sequence, consisting of at least a
* version integer of length 1 (3 encoded byes) and at least one other
* datum (two encoded bytes), plus at least two bytes for the outer
* sequence. Thus, even an empty PFX blob is at least 7 bytes in length.
*/
if
(
pPFX
->
cbData
<
7
)
ret
=
FALSE
;
else
if
(
pPFX
->
pbData
[
0
]
==
ASN_SEQUENCE
)
{
DWORD
len
;
if
((
ret
=
CRYPT_GetLengthIndefinite
(
pPFX
->
pbData
,
pPFX
->
cbData
,
&
len
)))
{
BYTE
lenLen
=
GET_LEN_BYTES
(
pPFX
->
pbData
[
1
]);
/* Need at least three bytes for the integer version */
if
(
pPFX
->
cbData
<
1
+
lenLen
+
3
)
ret
=
FALSE
;
else
if
(
pPFX
->
pbData
[
1
+
lenLen
]
!=
ASN_INTEGER
||
/* Tag */
pPFX
->
pbData
[
1
+
lenLen
+
1
]
!=
1
||
/* Definite length */
pPFX
->
pbData
[
1
+
lenLen
+
2
]
!=
3
)
/* PFX version */
ret
=
FALSE
;
}
}
else
ret
=
FALSE
;
return
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