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
3abb8e63
Commit
3abb8e63
authored
May 31, 2005
by
Juan Lang
Committed by
Alexandre Julliard
May 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implement Crypt{Get|Set}OIDFunctionValue
- fix bug and memory leak in last patch
parent
a2f1fd3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
12 deletions
+77
-12
crypt32.spec
dlls/crypt32/crypt32.spec
+1
-1
encode.c
dlls/crypt32/encode.c
+76
-1
main.c
dlls/crypt32/main.c
+0
-10
No files found.
dlls/crypt32/crypt32.spec
View file @
3abb8e63
...
...
@@ -143,7 +143,7 @@
@ stdcall CryptSIPRemoveProvider(ptr)
@ stdcall CryptSIPRetrieveSubjectGuid(wstr long ptr)
@ stub CryptSetAsyncParam
@ st
ub CryptSetOIDFunctionValue
@ st
dcall CryptSetOIDFunctionValue(long str str wstr long ptr long)
@ stub CryptSetProviderU
@ stub CryptSignAndEncodeCertificate
@ stub CryptSignAndEncryptMessage
...
...
dlls/crypt32/encode.c
View file @
3abb8e63
...
...
@@ -132,8 +132,83 @@ BOOL WINAPI CryptUnregisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
szKey
=
CRYPT_GetKeyName
(
dwEncodingType
,
pszFuncName
,
pszOID
);
rc
=
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
szKey
);
if
(
!
rc
)
HeapFree
(
GetProcessHeap
(),
0
,
szKey
);
if
(
rc
)
SetLastError
(
rc
);
return
rc
?
FALSE
:
TRUE
;
}
BOOL
WINAPI
CryptGetOIDFunctionValue
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
LPCSTR
pszOID
,
LPCWSTR
pwszValueName
,
DWORD
*
pdwValueType
,
BYTE
*
pbValueData
,
DWORD
*
pcbValueData
)
{
LPSTR
szKey
;
LONG
rc
;
HKEY
hKey
;
TRACE
(
"%lx %s %s %s %p %p %p
\n
"
,
dwEncodingType
,
debugstr_a
(
pszFuncName
),
debugstr_a
(
pszOID
),
debugstr_w
(
pwszValueName
),
pdwValueType
,
pbValueData
,
pcbValueData
);
if
(
!
GET_CERT_ENCODING_TYPE
(
dwEncodingType
))
return
TRUE
;
if
(
!
pszFuncName
||
!
pszOID
||
!
pwszValueName
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
szKey
=
CRYPT_GetKeyName
(
dwEncodingType
,
pszFuncName
,
pszOID
);
rc
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
szKey
,
&
hKey
);
HeapFree
(
GetProcessHeap
(),
0
,
szKey
);
if
(
rc
)
SetLastError
(
rc
);
else
{
rc
=
RegQueryValueExW
(
hKey
,
pwszValueName
,
NULL
,
pdwValueType
,
pbValueData
,
pcbValueData
);
if
(
rc
)
SetLastError
(
rc
);
RegCloseKey
(
hKey
);
}
return
rc
?
FALSE
:
TRUE
;
}
BOOL
WINAPI
CryptSetOIDFunctionValue
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
LPCSTR
pszOID
,
LPCWSTR
pwszValueName
,
DWORD
dwValueType
,
const
BYTE
*
pbValueData
,
DWORD
cbValueData
)
{
LPSTR
szKey
;
LONG
rc
;
HKEY
hKey
;
TRACE
(
"%lx %s %s %s %ld %p %ld
\n
"
,
dwEncodingType
,
debugstr_a
(
pszFuncName
),
debugstr_a
(
pszOID
),
debugstr_w
(
pwszValueName
),
dwValueType
,
pbValueData
,
cbValueData
);
if
(
!
GET_CERT_ENCODING_TYPE
(
dwEncodingType
))
return
TRUE
;
if
(
!
pszFuncName
||
!
pszOID
||
!
pwszValueName
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
szKey
=
CRYPT_GetKeyName
(
dwEncodingType
,
pszFuncName
,
pszOID
);
rc
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
szKey
,
&
hKey
);
HeapFree
(
GetProcessHeap
(),
0
,
szKey
);
if
(
rc
)
SetLastError
(
rc
);
else
{
rc
=
RegSetValueExW
(
hKey
,
pwszValueName
,
0
,
dwValueType
,
pbValueData
,
cbValueData
);
if
(
rc
)
SetLastError
(
rc
);
RegCloseKey
(
hKey
);
}
return
rc
?
FALSE
:
TRUE
;
}
...
...
dlls/crypt32/main.c
View file @
3abb8e63
...
...
@@ -183,16 +183,6 @@ BOOL WINAPI CryptSIPLoad
return
FALSE
;
}
BOOL
WINAPI
CryptGetOIDFunctionValue
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
LPCSTR
pszOID
,
LPCWSTR
pwszValueName
,
DWORD
*
pdwValueType
,
BYTE
*
pbValueData
,
DWORD
*
pcbValueData
)
{
FIXME
(
"(%lx,%s,%s,%s,%p,%p,%p) stub!
\n
"
,
dwEncodingType
,
pszFuncName
,
pszOID
,
debugstr_w
(
pwszValueName
),
pdwValueType
,
pbValueData
,
pcbValueData
);
return
FALSE
;
}
BOOL
WINAPI
CryptRegisterDefaultOIDFunction
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
DWORD
dwIndex
,
LPCWSTR
pwszDll
)
...
...
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