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
56b51646
Commit
56b51646
authored
May 17, 2004
by
Juan Lang
Committed by
Alexandre Julliard
May 17, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- If a crypto provider does not have a Signature in the registry,
check for the presence of the SigInFile value before failing. - Get rid of a couple redundant assignments.
parent
8c29b5f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
19 deletions
+38
-19
crypt.c
dlls/advapi32/crypt.c
+38
-19
No files found.
dlls/advapi32/crypt.c
View file @
56b51646
...
...
@@ -371,26 +371,47 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
}
r
=
RegQueryValueExA
(
key
,
"Signature"
,
NULL
,
&
keytype
,
NULL
,
&
len
);
if
(
r
!=
ERROR_SUCCESS
||
keytype
!=
REG_BINARY
)
if
(
r
==
ERROR_SUCCESS
&&
keytype
==
REG_BINARY
)
{
TRACE
(
"error %ld reading size of 'Signature'
\n
"
,
r
);
RegCloseKey
(
key
);
SetLastError
(
NTE_PROV_TYPE_ENTRY_BAD
);
goto
error
;
}
if
(
!
(
signature
=
CRYPT_Alloc
(
len
)))
{
RegCloseKey
(
key
);
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
goto
error
;
if
(
!
(
signature
=
CRYPT_Alloc
(
len
)))
{
RegCloseKey
(
key
);
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
goto
error
;
}
r
=
RegQueryValueExA
(
key
,
"Signature"
,
NULL
,
NULL
,
signature
,
&
len
);
if
(
r
!=
ERROR_SUCCESS
)
{
TRACE
(
"error %ld reading 'Signature'
\n
"
,
r
);
RegCloseKey
(
key
);
SetLastError
(
NTE_PROV_TYPE_ENTRY_BAD
);
goto
error
;
}
}
r
=
RegQueryValueExA
(
key
,
"Signature"
,
NULL
,
NULL
,
signature
,
&
len
);
if
(
r
!=
ERROR_SUCCESS
)
else
{
TRACE
(
"error %ld reading 'Signature'
\n
"
,
r
);
RegCloseKey
(
key
);
SetLastError
(
NTE_PROV_TYPE_ENTRY_BAD
);
goto
error
;
r
=
RegQueryValueExA
(
key
,
"SigInFile"
,
NULL
,
&
keytype
,
NULL
,
&
len
);
if
(
r
!=
ERROR_SUCCESS
)
{
TRACE
(
"error %ld reading size of 'SigInFile'
\n
"
,
r
);
RegCloseKey
(
key
);
SetLastError
(
NTE_PROV_TYPE_ENTRY_BAD
);
goto
error
;
}
else
{
/* FIXME: The presence of the SigInFile value indicates the
* provider's signature is in its resources, so need to read it.
* But since CRYPT_VerifyImage is stubbed, provide any old thing
* for now.
*/
if
(
!
(
signature
=
CRYPT_Alloc
(
1
)))
{
RegCloseKey
(
key
);
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
goto
error
;
}
}
}
RegCloseKey
(
key
);
len
=
ExpandEnvironmentStringsA
(
temp
,
NULL
,
0
);
...
...
@@ -435,8 +456,6 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
CRYPT_Free
(
pProv
->
pFuncs
);
CRYPT_Free
(
pProv
);
}
else
{
pProv
->
pVTable
->
pszProvName
=
provname
;
pProv
->
pVTable
->
dwProvType
=
dwProvType
;
*
phProv
=
(
HCRYPTPROV
)
pProv
;
}
return
TRUE
;
...
...
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