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
8778b9f5
Commit
8778b9f5
authored
Aug 09, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Correct loading OID functions from the registry.
parent
6ac08161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
oid.c
dlls/crypt32/oid.c
+8
-6
No files found.
dlls/crypt32/oid.c
View file @
8778b9f5
...
...
@@ -177,7 +177,8 @@ static char *CRYPT_GetKeyName(DWORD dwEncodingType, LPCSTR pszFuncName,
len
=
sizeof
(
szEncodingTypeFmt
)
+
lstrlenA
(
pszFuncName
)
+
lstrlenA
(
oid
);
szKey
=
CryptMemAlloc
(
len
);
if
(
szKey
)
sprintf
(
szKey
,
szEncodingTypeFmt
,
dwEncodingType
,
pszFuncName
,
oid
);
sprintf
(
szKey
,
szEncodingTypeFmt
,
GET_CERT_ENCODING_TYPE
(
dwEncodingType
),
pszFuncName
,
oid
);
return
szKey
;
}
...
...
@@ -250,7 +251,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule,
func
=
CryptMemAlloc
(
sizeof
(
struct
OIDFunction
));
if
(
func
)
{
func
->
encoding
=
dwEncodingType
;
func
->
encoding
=
GET_CERT_ENCODING_TYPE
(
dwEncodingType
)
;
if
(
HIWORD
(
rgFuncEntry
[
i
].
pszOID
))
{
LPSTR
oid
;
...
...
@@ -290,7 +291,7 @@ static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID,
DWORD
type
,
size
=
0
;
rc
=
RegQueryValueExA
(
key
,
"FuncName"
,
NULL
,
&
type
,
NULL
,
&
size
);
if
(
rc
==
ERROR_MORE_DATA
&&
type
==
REG_SZ
)
if
(
(
!
rc
||
rc
==
ERROR_MORE_DATA
)
&&
type
==
REG_SZ
)
{
funcName
=
CryptMemAlloc
(
size
);
rc
=
RegQueryValueExA
(
key
,
"FuncName"
,
NULL
,
&
type
,
...
...
@@ -299,7 +300,7 @@ static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID,
else
funcName
=
szFuncName
;
rc
=
RegQueryValueExW
(
key
,
DllW
,
NULL
,
&
type
,
NULL
,
&
size
);
if
(
rc
==
ERROR_MORE_DATA
&&
type
==
REG_SZ
)
if
(
(
!
rc
||
rc
==
ERROR_MORE_DATA
)
&&
type
==
REG_SZ
)
{
LPWSTR
dllName
=
CryptMemAlloc
(
size
);
...
...
@@ -318,7 +319,7 @@ static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID,
lib
=
LoadLibraryW
(
dllName
);
if
(
lib
)
{
*
ppvFuncAddr
=
GetProcAddress
(
lib
,
szF
uncName
);
*
ppvFuncAddr
=
GetProcAddress
(
lib
,
f
uncName
);
if
(
*
ppvFuncAddr
)
{
*
phFuncAddr
=
(
HCRYPTOIDFUNCADDR
)
lib
;
...
...
@@ -368,7 +369,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
EnterCriticalSection
(
&
set
->
cs
);
LIST_FOR_EACH_ENTRY
(
function
,
&
set
->
functions
,
struct
OIDFunction
,
next
)
{
if
(
function
->
encoding
==
dwEncodingType
)
if
(
function
->
encoding
==
GET_CERT_ENCODING_TYPE
(
dwEncodingType
)
)
{
if
(
HIWORD
(
pszOID
))
{
...
...
@@ -395,6 +396,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
if
(
!*
ppvFuncAddr
)
ret
=
CRYPT_GetFuncFromReg
(
dwEncodingType
,
pszOID
,
set
->
name
,
ppvFuncAddr
,
phFuncAddr
);
TRACE
(
"returning %d
\n
"
,
ret
);
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