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
90358516
Commit
90358516
authored
Jan 28, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Remove remaining superfluous pointer casts.
parent
c0d2a21d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
116 additions
and
123 deletions
+116
-123
filestore.c
dlls/crypt32/filestore.c
+13
-13
msg.c
dlls/crypt32/msg.c
+34
-39
object.c
dlls/crypt32/object.c
+13
-13
oid.c
dlls/crypt32/oid.c
+11
-11
provstore.c
dlls/crypt32/provstore.c
+5
-5
regstore.c
dlls/crypt32/regstore.c
+8
-8
serialize.c
dlls/crypt32/serialize.c
+5
-5
store.c
dlls/crypt32/store.c
+27
-29
No files found.
dlls/crypt32/filestore.c
View file @
90358516
...
@@ -37,7 +37,7 @@ typedef struct _WINE_FILESTOREINFO
...
@@ -37,7 +37,7 @@ typedef struct _WINE_FILESTOREINFO
static
void
WINAPI
CRYPT_FileCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
static
void
WINAPI
CRYPT_FileCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
if
(
store
->
dirty
)
if
(
store
->
dirty
)
...
@@ -51,7 +51,7 @@ static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
...
@@ -51,7 +51,7 @@ static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
static
BOOL
WINAPI
CRYPT_FileWriteCert
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileWriteCert
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
cert
,
DWORD
dwFlags
)
PCCERT_CONTEXT
cert
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
cert
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
cert
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -61,7 +61,7 @@ static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
...
@@ -61,7 +61,7 @@ static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_FileDeleteCert
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileDeleteCert
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
pCertContext
,
DWORD
dwFlags
)
PCCERT_CONTEXT
pCertContext
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCertContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCertContext
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -71,7 +71,7 @@ static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
...
@@ -71,7 +71,7 @@ static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_FileWriteCRL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileWriteCRL
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
crl
,
DWORD
dwFlags
)
PCCRL_CONTEXT
crl
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
crl
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
crl
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -81,7 +81,7 @@ static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
...
@@ -81,7 +81,7 @@ static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_FileDeleteCRL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileDeleteCRL
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwFlags
)
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCrlContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCrlContext
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -91,7 +91,7 @@ static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
...
@@ -91,7 +91,7 @@ static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_FileWriteCTL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileWriteCTL
(
HCERTSTORE
hCertStore
,
PCCTL_CONTEXT
ctl
,
DWORD
dwFlags
)
PCCTL_CONTEXT
ctl
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
ctl
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
ctl
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -101,7 +101,7 @@ static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
...
@@ -101,7 +101,7 @@ static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_FileDeleteCTL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_FileDeleteCTL
(
HCERTSTORE
hCertStore
,
PCCTL_CONTEXT
pCtlContext
,
DWORD
dwFlags
)
PCCTL_CONTEXT
pCtlContext
,
DWORD
dwFlags
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCtlContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hCertStore
,
pCtlContext
,
dwFlags
);
store
->
dirty
=
TRUE
;
store
->
dirty
=
TRUE
;
...
@@ -129,7 +129,7 @@ static BOOL CRYPT_ReadBlobFromFile(HANDLE file, PCERT_BLOB blob)
...
@@ -129,7 +129,7 @@ static BOOL CRYPT_ReadBlobFromFile(HANDLE file, PCERT_BLOB blob)
static
BOOL
WINAPI
CRYPT_FileControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
static
BOOL
WINAPI
CRYPT_FileControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
{
{
PWINE_FILESTOREINFO
store
=
(
PWINE_FILESTOREINFO
)
hCertStore
;
PWINE_FILESTOREINFO
store
=
hCertStore
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
...
@@ -292,7 +292,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -292,7 +292,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
DWORD
dwFlags
,
const
void
*
pvPara
)
DWORD
dwFlags
,
const
void
*
pvPara
)
{
{
HCERTSTORE
store
=
0
;
HCERTSTORE
store
=
0
;
LPCWSTR
fileName
=
(
LPCWSTR
)
pvPara
;
LPCWSTR
fileName
=
pvPara
;
DWORD
access
,
create
;
DWORD
access
,
create
;
HANDLE
file
;
HANDLE
file
;
...
@@ -376,7 +376,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -376,7 +376,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
CryptReleaseContext
(
hCryptProv
,
0
);
CryptReleaseContext
(
hCryptProv
,
0
);
}
}
}
}
return
(
PWINECRYPT_CERTSTORE
)
store
;
return
store
;
}
}
PWINECRYPT_CERTSTORE
CRYPT_FileNameOpenStoreA
(
HCRYPTPROV
hCryptProv
,
PWINECRYPT_CERTSTORE
CRYPT_FileNameOpenStoreA
(
HCRYPTPROV
hCryptProv
,
...
@@ -386,21 +386,21 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
...
@@ -386,21 +386,21 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE
ret
=
NULL
;
PWINECRYPT_CERTSTORE
ret
=
NULL
;
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_a
(
(
LPCSTR
)
pvPara
));
debugstr_a
(
pvPara
));
if
(
!
pvPara
)
if
(
!
pvPara
)
{
{
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
NULL
;
return
NULL
;
}
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
NULL
,
0
);
if
(
len
)
if
(
len
)
{
{
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
storeName
)
if
(
storeName
)
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
storeName
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
storeName
,
len
);
ret
=
CRYPT_FileNameOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
ret
=
CRYPT_FileNameOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
CryptMemFree
(
storeName
);
CryptMemFree
(
storeName
);
}
}
...
...
dlls/crypt32/msg.c
View file @
90358516
This diff is collapsed.
Click to expand it.
dlls/crypt32/object.c
View file @
90358516
...
@@ -108,11 +108,11 @@ static BOOL CRYPT_QueryContextObject(DWORD dwObjectType, const void *pvObject,
...
@@ -108,11 +108,11 @@ static BOOL CRYPT_QueryContextObject(DWORD dwObjectType, const void *pvObject,
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
* just read the file directly
* just read the file directly
*/
*/
ret
=
CRYPT_ReadBlobFromFile
(
(
LPCWSTR
)
pvObject
,
&
fileBlob
);
ret
=
CRYPT_ReadBlobFromFile
(
pvObject
,
&
fileBlob
);
blob
=
&
fileBlob
;
blob
=
&
fileBlob
;
break
;
break
;
case
CERT_QUERY_OBJECT_BLOB
:
case
CERT_QUERY_OBJECT_BLOB
:
blob
=
(
const
CERT_BLOB
*
)
pvObject
;
blob
=
pvObject
;
ret
=
TRUE
;
ret
=
TRUE
;
break
;
break
;
default:
default:
...
@@ -198,11 +198,11 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
...
@@ -198,11 +198,11 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
* just read the file directly
* just read the file directly
*/
*/
ret
=
CRYPT_ReadBlobFromFile
(
(
LPCWSTR
)
pvObject
,
&
fileBlob
);
ret
=
CRYPT_ReadBlobFromFile
(
pvObject
,
&
fileBlob
);
blob
=
&
fileBlob
;
blob
=
&
fileBlob
;
break
;
break
;
case
CERT_QUERY_OBJECT_BLOB
:
case
CERT_QUERY_OBJECT_BLOB
:
blob
=
(
const
CERT_BLOB
*
)
pvObject
;
blob
=
pvObject
;
ret
=
TRUE
;
ret
=
TRUE
;
break
;
break
;
default:
default:
...
@@ -287,7 +287,7 @@ static BOOL CRYPT_QuerySerializedStoreObject(DWORD dwObjectType,
...
@@ -287,7 +287,7 @@ static BOOL CRYPT_QuerySerializedStoreObject(DWORD dwObjectType,
const
void
*
pvObject
,
DWORD
*
pdwMsgAndCertEncodingType
,
DWORD
*
pdwContentType
,
const
void
*
pvObject
,
DWORD
*
pdwMsgAndCertEncodingType
,
DWORD
*
pdwContentType
,
HCERTSTORE
*
phCertStore
,
HCRYPTMSG
*
phMsg
)
HCERTSTORE
*
phCertStore
,
HCRYPTMSG
*
phMsg
)
{
{
LPCWSTR
fileName
=
(
LPCWSTR
)
pvObject
;
LPCWSTR
fileName
=
pvObject
;
HANDLE
file
;
HANDLE
file
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
...
@@ -450,11 +450,11 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
...
@@ -450,11 +450,11 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
/* This isn't an embedded PKCS7 message, so just read the file
/* This isn't an embedded PKCS7 message, so just read the file
* directly
* directly
*/
*/
ret
=
CRYPT_ReadBlobFromFile
(
(
LPCWSTR
)
pvObject
,
&
fileBlob
);
ret
=
CRYPT_ReadBlobFromFile
(
pvObject
,
&
fileBlob
);
blob
=
&
fileBlob
;
blob
=
&
fileBlob
;
break
;
break
;
case
CERT_QUERY_OBJECT_BLOB
:
case
CERT_QUERY_OBJECT_BLOB
:
blob
=
(
const
CERT_BLOB
*
)
pvObject
;
blob
=
pvObject
;
ret
=
TRUE
;
ret
=
TRUE
;
break
;
break
;
default:
default:
...
@@ -583,7 +583,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
...
@@ -583,7 +583,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
GUID
subject
;
GUID
subject
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
pvObject
));
TRACE
(
"%s
\n
"
,
debugstr_w
(
pvObject
));
if
(
dwObjectType
!=
CERT_QUERY_OBJECT_FILE
)
if
(
dwObjectType
!=
CERT_QUERY_OBJECT_FILE
)
{
{
...
@@ -592,11 +592,11 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
...
@@ -592,11 +592,11 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
SetLastError
(
E_INVALIDARG
);
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
return
FALSE
;
}
}
file
=
CreateFileW
(
(
LPCWSTR
)
pvObject
,
GENERIC_READ
,
FILE_SHARE_READ
,
file
=
CreateFileW
(
pvObject
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
{
ret
=
CryptSIPRetrieveSubjectGuid
(
(
LPCWSTR
)
pvObject
,
file
,
&
subject
);
ret
=
CryptSIPRetrieveSubjectGuid
(
pvObject
,
file
,
&
subject
);
if
(
ret
)
if
(
ret
)
{
{
SIP_DISPATCH_INFO
sip
;
SIP_DISPATCH_INFO
sip
;
...
@@ -614,7 +614,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
...
@@ -614,7 +614,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
subjectInfo
.
cbSize
=
sizeof
(
subjectInfo
);
subjectInfo
.
cbSize
=
sizeof
(
subjectInfo
);
subjectInfo
.
pgSubjectType
=
&
subject
;
subjectInfo
.
pgSubjectType
=
&
subject
;
subjectInfo
.
hFile
=
file
;
subjectInfo
.
hFile
=
file
;
subjectInfo
.
pwsFileName
=
(
LPCWSTR
)
pvObject
;
subjectInfo
.
pwsFileName
=
pvObject
;
ret
=
sip
.
pfGet
(
&
subjectInfo
,
&
encodingType
,
0
,
&
blob
.
cbData
,
ret
=
sip
.
pfGet
(
&
subjectInfo
,
&
encodingType
,
0
,
&
blob
.
cbData
,
NULL
);
NULL
);
if
(
ret
)
if
(
ret
)
...
@@ -1623,7 +1623,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
...
@@ -1623,7 +1623,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
else
else
{
{
*
pcbFormat
=
bytesNeeded
;
*
pcbFormat
=
bytesNeeded
;
strcpyW
(
(
LPWSTR
)
pbFormat
,
infoNotAvailable
);
strcpyW
(
pbFormat
,
infoNotAvailable
);
}
}
}
}
else
else
...
@@ -2021,7 +2021,7 @@ static BOOL WINAPI CRYPT_FormatCRLDistPoints(DWORD dwCertEncodingType,
...
@@ -2021,7 +2021,7 @@ static BOOL WINAPI CRYPT_FormatCRLDistPoints(DWORD dwCertEncodingType,
else
else
{
{
*
pcbFormat
=
bytesNeeded
;
*
pcbFormat
=
bytesNeeded
;
strcpyW
(
(
LPWSTR
)
pbFormat
,
infoNotAvailable
);
strcpyW
(
pbFormat
,
infoNotAvailable
);
}
}
}
}
else
else
...
...
dlls/crypt32/oid.c
View file @
90358516
...
@@ -123,7 +123,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
...
@@ -123,7 +123,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
{
{
if
(
!
strcasecmp
(
pszFuncName
,
cursor
->
name
))
if
(
!
strcasecmp
(
pszFuncName
,
cursor
->
name
))
{
{
ret
=
(
HCRYPTOIDFUNCSET
)
cursor
;
ret
=
cursor
;
break
;
break
;
}
}
}
}
...
@@ -151,7 +151,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
...
@@ -151,7 +151,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
}
}
LeaveCriticalSection
(
&
funcSetCS
);
LeaveCriticalSection
(
&
funcSetCS
);
return
(
HCRYPTOIDFUNCSET
)
ret
;
return
ret
;
}
}
static
char
*
CRYPT_GetKeyName
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
static
char
*
CRYPT_GetKeyName
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
...
@@ -194,7 +194,7 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet,
...
@@ -194,7 +194,7 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet,
DWORD
dwEncodingType
,
LPWSTR
pwszDllList
,
DWORD
*
pcchDllList
)
DWORD
dwEncodingType
,
LPWSTR
pwszDllList
,
DWORD
*
pcchDllList
)
{
{
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
struct
OIDFunctionSet
*
set
=
(
struct
OIDFunctionSet
*
)
hFuncSet
;
struct
OIDFunctionSet
*
set
=
hFuncSet
;
char
*
keyName
;
char
*
keyName
;
HKEY
key
;
HKEY
key
;
long
rc
;
long
rc
;
...
@@ -244,7 +244,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule,
...
@@ -244,7 +244,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule,
TRACE
(
"(%p, %d, %s, %d, %p, %08x)
\n
"
,
hModule
,
dwEncodingType
,
TRACE
(
"(%p, %d, %s, %d, %p, %08x)
\n
"
,
hModule
,
dwEncodingType
,
debugstr_a
(
pszFuncName
),
cFuncEntry
,
rgFuncEntry
,
dwFlags
);
debugstr_a
(
pszFuncName
),
cFuncEntry
,
rgFuncEntry
,
dwFlags
);
set
=
(
struct
OIDFunctionSet
*
)
CryptInitOIDFunctionSet
(
pszFuncName
,
0
);
set
=
CryptInitOIDFunctionSet
(
pszFuncName
,
0
);
if
(
set
)
if
(
set
)
{
{
DWORD
i
;
DWORD
i
;
...
@@ -386,7 +386,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
...
@@ -386,7 +386,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
HCRYPTOIDFUNCADDR
*
phFuncAddr
)
HCRYPTOIDFUNCADDR
*
phFuncAddr
)
{
{
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
struct
OIDFunctionSet
*
set
=
(
struct
OIDFunctionSet
*
)
hFuncSet
;
struct
OIDFunctionSet
*
set
=
hFuncSet
;
TRACE
(
"(%p, %d, %s, %08x, %p, %p)
\n
"
,
hFuncSet
,
dwEncodingType
,
TRACE
(
"(%p, %d, %s, %08x, %p, %p)
\n
"
,
hFuncSet
,
dwEncodingType
,
debugstr_a
(
pszOID
),
dwFlags
,
ppvFuncAddr
,
phFuncAddr
);
debugstr_a
(
pszOID
),
dwFlags
,
ppvFuncAddr
,
phFuncAddr
);
...
@@ -441,7 +441,7 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr,
...
@@ -441,7 +441,7 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr,
*/
*/
if
(
hFuncAddr
)
if
(
hFuncAddr
)
{
{
struct
FuncAddr
*
addr
=
(
struct
FuncAddr
*
)
hFuncAddr
;
struct
FuncAddr
*
addr
=
hFuncAddr
;
CryptMemFree
(
addr
->
dllList
);
CryptMemFree
(
addr
->
dllList
);
FreeLibrary
(
addr
->
lib
);
FreeLibrary
(
addr
->
lib
);
...
@@ -474,7 +474,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
...
@@ -474,7 +474,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
DWORD
dwEncodingType
,
LPCWSTR
pwszDll
,
DWORD
dwFlags
,
void
**
ppvFuncAddr
,
DWORD
dwEncodingType
,
LPCWSTR
pwszDll
,
DWORD
dwFlags
,
void
**
ppvFuncAddr
,
HCRYPTOIDFUNCADDR
*
phFuncAddr
)
HCRYPTOIDFUNCADDR
*
phFuncAddr
)
{
{
struct
OIDFunctionSet
*
set
=
(
struct
OIDFunctionSet
*
)
hFuncSet
;
struct
OIDFunctionSet
*
set
=
hFuncSet
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %d, %s, %08x, %p, %p)
\n
"
,
hFuncSet
,
dwEncodingType
,
TRACE
(
"(%p, %d, %s, %08x, %p, %p)
\n
"
,
hFuncSet
,
dwEncodingType
,
...
@@ -509,7 +509,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
...
@@ -509,7 +509,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
}
}
else
else
{
{
struct
FuncAddr
*
addr
=
(
struct
FuncAddr
*
)
*
phFuncAddr
;
struct
FuncAddr
*
addr
=
*
phFuncAddr
;
if
(
!
addr
)
if
(
!
addr
)
{
{
...
@@ -1504,11 +1504,11 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
...
@@ -1504,11 +1504,11 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
{
{
struct
OIDInfo
*
info
;
struct
OIDInfo
*
info
;
TRACE
(
"CRYPT_OID_INFO_NAME_KEY: %s
\n
"
,
debugstr_w
(
(
LPWSTR
)
pvKey
));
TRACE
(
"CRYPT_OID_INFO_NAME_KEY: %s
\n
"
,
debugstr_w
(
pvKey
));
EnterCriticalSection
(
&
oidInfoCS
);
EnterCriticalSection
(
&
oidInfoCS
);
LIST_FOR_EACH_ENTRY
(
info
,
&
oidInfo
,
struct
OIDInfo
,
entry
)
LIST_FOR_EACH_ENTRY
(
info
,
&
oidInfo
,
struct
OIDInfo
,
entry
)
{
{
if
(
!
lstrcmpW
(
info
->
info
.
pwszName
,
(
LPWSTR
)
pvKey
)
&&
if
(
!
lstrcmpW
(
info
->
info
.
pwszName
,
pvKey
)
&&
(
!
dwGroupId
||
info
->
info
.
dwGroupId
==
dwGroupId
))
(
!
dwGroupId
||
info
->
info
.
dwGroupId
==
dwGroupId
))
{
{
ret
=
&
info
->
info
;
ret
=
&
info
->
info
;
...
@@ -1521,7 +1521,7 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
...
@@ -1521,7 +1521,7 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
case
CRYPT_OID_INFO_OID_KEY
:
case
CRYPT_OID_INFO_OID_KEY
:
{
{
struct
OIDInfo
*
info
;
struct
OIDInfo
*
info
;
LPSTR
oid
=
(
LPSTR
)
pvKey
;
LPSTR
oid
=
pvKey
;
TRACE
(
"CRYPT_OID_INFO_OID_KEY: %s
\n
"
,
debugstr_a
(
oid
));
TRACE
(
"CRYPT_OID_INFO_OID_KEY: %s
\n
"
,
debugstr_a
(
oid
));
EnterCriticalSection
(
&
oidInfoCS
);
EnterCriticalSection
(
&
oidInfoCS
);
...
...
dlls/crypt32/provstore.c
View file @
90358516
...
@@ -43,7 +43,7 @@ typedef struct _WINE_PROVIDERSTORE
...
@@ -43,7 +43,7 @@ typedef struct _WINE_PROVIDERSTORE
static
void
WINAPI
CRYPT_ProvCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
static
void
WINAPI
CRYPT_ProvCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
{
PWINE_PROVIDERSTORE
store
=
(
PWINE_PROVIDERSTORE
)
hCertStore
;
PWINE_PROVIDERSTORE
store
=
hCertStore
;
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
...
@@ -69,7 +69,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
...
@@ -69,7 +69,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
{
{
ret
=
TRUE
;
ret
=
TRUE
;
if
(
ps
->
provWriteCert
)
if
(
ps
->
provWriteCert
)
ret
=
ps
->
provWriteCert
(
ps
->
hStoreProv
,
(
PCCERT_CONTEXT
)
cert
,
ret
=
ps
->
provWriteCert
(
ps
->
hStoreProv
,
cert
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
if
(
ret
)
ret
=
ps
->
memStore
->
certs
.
addContext
(
ps
->
memStore
,
cert
,
NULL
,
ret
=
ps
->
memStore
->
certs
.
addContext
(
ps
->
memStore
,
cert
,
NULL
,
...
@@ -135,7 +135,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
...
@@ -135,7 +135,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
{
{
ret
=
TRUE
;
ret
=
TRUE
;
if
(
ps
->
provWriteCrl
)
if
(
ps
->
provWriteCrl
)
ret
=
ps
->
provWriteCrl
(
ps
->
hStoreProv
,
(
PCCRL_CONTEXT
)
crl
,
ret
=
ps
->
provWriteCrl
(
ps
->
hStoreProv
,
crl
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
if
(
ret
)
ret
=
ps
->
memStore
->
crls
.
addContext
(
ps
->
memStore
,
crl
,
NULL
,
ret
=
ps
->
memStore
->
crls
.
addContext
(
ps
->
memStore
,
crl
,
NULL
,
...
@@ -202,7 +202,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
...
@@ -202,7 +202,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
{
{
ret
=
TRUE
;
ret
=
TRUE
;
if
(
ps
->
provWriteCtl
)
if
(
ps
->
provWriteCtl
)
ret
=
ps
->
provWriteCtl
(
ps
->
hStoreProv
,
(
PCCTL_CONTEXT
)
ctl
,
ret
=
ps
->
provWriteCtl
(
ps
->
hStoreProv
,
ctl
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
if
(
ret
)
ret
=
ps
->
memStore
->
ctls
.
addContext
(
ps
->
memStore
,
ctl
,
NULL
,
ret
=
ps
->
memStore
->
ctls
.
addContext
(
ps
->
memStore
,
ctl
,
NULL
,
...
@@ -250,7 +250,7 @@ static BOOL CRYPT_ProvDeleteCTL(PWINECRYPT_CERTSTORE store, void *ctl)
...
@@ -250,7 +250,7 @@ static BOOL CRYPT_ProvDeleteCTL(PWINECRYPT_CERTSTORE store, void *ctl)
static
BOOL
WINAPI
CRYPT_ProvControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
static
BOOL
WINAPI
CRYPT_ProvControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
{
{
PWINE_PROVIDERSTORE
store
=
(
PWINE_PROVIDERSTORE
)
hCertStore
;
PWINE_PROVIDERSTORE
store
=
hCertStore
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
...
...
dlls/crypt32/regstore.c
View file @
90358516
...
@@ -319,7 +319,7 @@ static BOOL CRYPT_RegFlushStore(PWINE_REGSTOREINFO store, BOOL force)
...
@@ -319,7 +319,7 @@ static BOOL CRYPT_RegFlushStore(PWINE_REGSTOREINFO store, BOOL force)
static
void
WINAPI
CRYPT_RegCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
static
void
WINAPI
CRYPT_RegCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
if
(
dwFlags
)
if
(
dwFlags
)
...
@@ -392,7 +392,7 @@ static BOOL CRYPT_RegDeleteContext(PWINE_REGSTOREINFO store,
...
@@ -392,7 +392,7 @@ static BOOL CRYPT_RegDeleteContext(PWINE_REGSTOREINFO store,
static
BOOL
WINAPI
CRYPT_RegWriteCert
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegWriteCert
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
cert
,
DWORD
dwFlags
)
PCCERT_CONTEXT
cert
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
cert
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
cert
,
dwFlags
);
...
@@ -402,7 +402,7 @@ static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
...
@@ -402,7 +402,7 @@ static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegDeleteCert
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegDeleteCert
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
pCertContext
,
DWORD
dwFlags
)
PCCERT_CONTEXT
pCertContext
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCertContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCertContext
,
dwFlags
);
...
@@ -413,7 +413,7 @@ static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
...
@@ -413,7 +413,7 @@ static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegWriteCRL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegWriteCRL
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
crl
,
DWORD
dwFlags
)
PCCRL_CONTEXT
crl
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
crl
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
crl
,
dwFlags
);
...
@@ -423,7 +423,7 @@ static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
...
@@ -423,7 +423,7 @@ static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegDeleteCRL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegDeleteCRL
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwFlags
)
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCrlContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCrlContext
,
dwFlags
);
...
@@ -434,7 +434,7 @@ static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
...
@@ -434,7 +434,7 @@ static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegWriteCTL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegWriteCTL
(
HCERTSTORE
hCertStore
,
PCCTL_CONTEXT
ctl
,
DWORD
dwFlags
)
PCCTL_CONTEXT
ctl
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
ctl
,
dwFlags
);
TRACE
(
"(%p, %p, %d)
\n
"
,
hCertStore
,
ctl
,
dwFlags
);
...
@@ -444,7 +444,7 @@ static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
...
@@ -444,7 +444,7 @@ static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegDeleteCTL
(
HCERTSTORE
hCertStore
,
static
BOOL
WINAPI
CRYPT_RegDeleteCTL
(
HCERTSTORE
hCertStore
,
PCCTL_CONTEXT
pCtlContext
,
DWORD
dwFlags
)
PCCTL_CONTEXT
pCtlContext
,
DWORD
dwFlags
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCtlContext
,
dwFlags
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
store
,
pCtlContext
,
dwFlags
);
...
@@ -455,7 +455,7 @@ static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
...
@@ -455,7 +455,7 @@ static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
static
BOOL
WINAPI
CRYPT_RegControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
static
BOOL
WINAPI
CRYPT_RegControl
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
{
{
PWINE_REGSTOREINFO
store
=
(
PWINE_REGSTOREINFO
)
hCertStore
;
PWINE_REGSTOREINFO
store
=
hCertStore
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
...
...
dlls/crypt32/serialize.c
View file @
90358516
...
@@ -627,7 +627,7 @@ static BOOL CRYPT_WriteSerializedStoreToFile(HANDLE file, HCERTSTORE store)
...
@@ -627,7 +627,7 @@ static BOOL CRYPT_WriteSerializedStoreToFile(HANDLE file, HCERTSTORE store)
static
BOOL
CRYPT_SavePKCSToMem
(
HCERTSTORE
store
,
static
BOOL
CRYPT_SavePKCSToMem
(
HCERTSTORE
store
,
DWORD
dwMsgAndCertEncodingType
,
void
*
handle
)
DWORD
dwMsgAndCertEncodingType
,
void
*
handle
)
{
{
CERT_BLOB
*
blob
=
(
CERT_BLOB
*
)
handle
;
CERT_BLOB
*
blob
=
handle
;
CRYPT_SIGNED_INFO
signedInfo
=
{
0
};
CRYPT_SIGNED_INFO
signedInfo
=
{
0
};
PCCERT_CONTEXT
cert
=
NULL
;
PCCERT_CONTEXT
cert
=
NULL
;
PCCRL_CONTEXT
crl
=
NULL
;
PCCRL_CONTEXT
crl
=
NULL
;
...
@@ -767,7 +767,7 @@ struct MemWrittenTracker
...
@@ -767,7 +767,7 @@ struct MemWrittenTracker
/* handle is a pointer to a MemWrittenTracker. Assumes its pointer is valid. */
/* handle is a pointer to a MemWrittenTracker. Assumes its pointer is valid. */
static
BOOL
CRYPT_MemOutputFunc
(
void
*
handle
,
const
void
*
buffer
,
DWORD
size
)
static
BOOL
CRYPT_MemOutputFunc
(
void
*
handle
,
const
void
*
buffer
,
DWORD
size
)
{
{
struct
MemWrittenTracker
*
tracker
=
(
struct
MemWrittenTracker
*
)
handle
;
struct
MemWrittenTracker
*
tracker
=
handle
;
BOOL
ret
;
BOOL
ret
;
if
(
tracker
->
written
+
size
>
tracker
->
cbData
)
if
(
tracker
->
written
+
size
>
tracker
->
cbData
)
...
@@ -797,7 +797,7 @@ static BOOL CRYPT_CountSerializedBytes(void *handle, const void *buffer,
...
@@ -797,7 +797,7 @@ static BOOL CRYPT_CountSerializedBytes(void *handle, const void *buffer,
static
BOOL
CRYPT_SaveSerializedToMem
(
HCERTSTORE
store
,
static
BOOL
CRYPT_SaveSerializedToMem
(
HCERTSTORE
store
,
DWORD
dwMsgAndCertEncodingType
,
void
*
handle
)
DWORD
dwMsgAndCertEncodingType
,
void
*
handle
)
{
{
CERT_BLOB
*
blob
=
(
CERT_BLOB
*
)
handle
;
CERT_BLOB
*
blob
=
handle
;
DWORD
size
=
0
;
DWORD
size
=
0
;
BOOL
ret
;
BOOL
ret
;
...
@@ -864,11 +864,11 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
...
@@ -864,11 +864,11 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
closeFile
=
FALSE
;
closeFile
=
FALSE
;
break
;
break
;
case
CERT_STORE_SAVE_TO_FILENAME_A
:
case
CERT_STORE_SAVE_TO_FILENAME_A
:
handle
=
CreateFileA
(
(
LPCSTR
)
pvSaveToPara
,
GENERIC_WRITE
,
0
,
NULL
,
handle
=
CreateFileA
(
pvSaveToPara
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
CREATE_ALWAYS
,
0
,
NULL
);
break
;
break
;
case
CERT_STORE_SAVE_TO_FILENAME_W
:
case
CERT_STORE_SAVE_TO_FILENAME_W
:
handle
=
CreateFileW
(
(
LPCWSTR
)
pvSaveToPara
,
GENERIC_WRITE
,
0
,
NULL
,
handle
=
CreateFileW
(
pvSaveToPara
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
CREATE_ALWAYS
,
0
,
NULL
);
break
;
break
;
case
CERT_STORE_SAVE_TO_MEMORY
:
case
CERT_STORE_SAVE_TO_MEMORY
:
...
...
dlls/crypt32/store.c
View file @
90358516
...
@@ -273,7 +273,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext)
...
@@ -273,7 +273,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext)
static
void
WINAPI
CRYPT_MemCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
static
void
WINAPI
CRYPT_MemCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
{
WINE_MEMSTORE
*
store
=
(
WINE_MEMSTORE
*
)
hCertStore
;
WINE_MEMSTORE
*
store
=
hCertStore
;
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
TRACE
(
"(%p, %08x)
\n
"
,
store
,
dwFlags
);
if
(
dwFlags
)
if
(
dwFlags
)
...
@@ -335,14 +335,14 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -335,14 +335,14 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
DWORD
dwFlags
,
const
void
*
pvPara
)
DWORD
dwFlags
,
const
void
*
pvPara
)
{
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
LPCWSTR
storeName
=
(
LPCWSTR
)
pvPara
;
LPCWSTR
storeName
=
pvPara
;
LPWSTR
storePath
;
LPWSTR
storePath
;
PWINECRYPT_CERTSTORE
store
=
NULL
;
PWINECRYPT_CERTSTORE
store
=
NULL
;
HKEY
root
;
HKEY
root
;
LPCWSTR
base
;
LPCWSTR
base
;
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_w
(
(
LPCWSTR
)
pvPara
));
debugstr_w
(
pvPara
));
if
(
!
pvPara
)
if
(
!
pvPara
)
{
{
...
@@ -450,21 +450,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
...
@@ -450,21 +450,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE
ret
=
NULL
;
PWINECRYPT_CERTSTORE
ret
=
NULL
;
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_a
(
(
LPCSTR
)
pvPara
));
debugstr_a
(
pvPara
));
if
(
!
pvPara
)
if
(
!
pvPara
)
{
{
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
NULL
;
return
NULL
;
}
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
NULL
,
0
);
if
(
len
)
if
(
len
)
{
{
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
storeName
)
if
(
storeName
)
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
storeName
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
storeName
,
len
);
ret
=
CRYPT_SysRegOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
ret
=
CRYPT_SysRegOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
CryptMemFree
(
storeName
);
CryptMemFree
(
storeName
);
}
}
...
@@ -479,7 +479,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -479,7 +479,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_w
(
(
LPCWSTR
)
pvPara
));
debugstr_w
(
pvPara
));
if
(
!
pvPara
)
if
(
!
pvPara
)
{
{
...
@@ -541,7 +541,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -541,7 +541,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
CryptReleaseContext
(
hCryptProv
,
0
);
CryptReleaseContext
(
hCryptProv
,
0
);
}
}
}
}
return
(
PWINECRYPT_CERTSTORE
)
store
;
return
store
;
}
}
static
PWINECRYPT_CERTSTORE
CRYPT_SysOpenStoreA
(
HCRYPTPROV
hCryptProv
,
static
PWINECRYPT_CERTSTORE
CRYPT_SysOpenStoreA
(
HCRYPTPROV
hCryptProv
,
...
@@ -551,21 +551,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
...
@@ -551,21 +551,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE
ret
=
NULL
;
PWINECRYPT_CERTSTORE
ret
=
NULL
;
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
TRACE
(
"(%ld, %08x, %s)
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_a
(
(
LPCSTR
)
pvPara
));
debugstr_a
(
pvPara
));
if
(
!
pvPara
)
if
(
!
pvPara
)
{
{
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
NULL
;
return
NULL
;
}
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
NULL
,
0
);
if
(
len
)
if
(
len
)
{
{
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
LPWSTR
storeName
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
storeName
)
if
(
storeName
)
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pvPara
,
-
1
,
storeName
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
storeName
,
len
);
ret
=
CRYPT_SysOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
ret
=
CRYPT_SysOpenStoreW
(
hCryptProv
,
dwFlags
,
storeName
);
CryptMemFree
(
storeName
);
CryptMemFree
(
storeName
);
}
}
...
@@ -669,7 +669,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
...
@@ -669,7 +669,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
{
{
HCRYPTMSG
msg
;
HCRYPTMSG
msg
;
PWINECRYPT_CERTSTORE
store
=
NULL
;
PWINECRYPT_CERTSTORE
store
=
NULL
;
const
CRYPT_DATA_BLOB
*
data
=
(
const
CRYPT_DATA_BLOB
*
)
pvPara
;
const
CRYPT_DATA_BLOB
*
data
=
pvPara
;
BOOL
ret
;
BOOL
ret
;
DWORD
msgOpenFlags
=
dwFlags
&
CERT_STORE_NO_CRYPT_RELEASE_FLAG
?
0
:
DWORD
msgOpenFlags
=
dwFlags
&
CERT_STORE_NO_CRYPT_RELEASE_FLAG
?
0
:
CMSG_CRYPT_RELEASE_CONTEXT_FLAG
;
CMSG_CRYPT_RELEASE_CONTEXT_FLAG
;
...
@@ -712,7 +712,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
...
@@ -712,7 +712,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
FIXME
(
"(%ld, %08x, %p): stub
\n
"
,
hCryptProv
,
dwFlags
,
pvPara
);
FIXME
(
"(%ld, %08x, %p): stub
\n
"
,
hCryptProv
,
dwFlags
,
pvPara
);
else
else
FIXME
(
"(%ld, %08x, %s): stub
\n
"
,
hCryptProv
,
dwFlags
,
FIXME
(
"(%ld, %08x, %s): stub
\n
"
,
hCryptProv
,
dwFlags
,
debugstr_w
(
(
LPCWSTR
)
pvPara
));
debugstr_w
(
pvPara
));
return
NULL
;
return
NULL
;
}
}
...
@@ -795,7 +795,7 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
...
@@ -795,7 +795,7 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
hCryptProv
,
dwFlags
,
pvPara
);
hCryptProv
,
dwFlags
,
pvPara
);
else
else
hcs
=
openFunc
(
hCryptProv
,
dwFlags
,
pvPara
);
hcs
=
openFunc
(
hCryptProv
,
dwFlags
,
pvPara
);
return
(
HCERTSTORE
)
hcs
;
return
hcs
;
}
}
HCERTSTORE
WINAPI
CertOpenSystemStoreA
(
HCRYPTPROV_LEGACY
hProv
,
HCERTSTORE
WINAPI
CertOpenSystemStoreA
(
HCRYPTPROV_LEGACY
hProv
,
...
@@ -829,7 +829,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
...
@@ -829,7 +829,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT
pCertContext
,
DWORD
dwAddDisposition
,
PCCERT_CONTEXT
pCertContext
,
DWORD
dwAddDisposition
,
PCCERT_CONTEXT
*
ppStoreContext
)
PCCERT_CONTEXT
*
ppStoreContext
)
{
{
PWINECRYPT_CERTSTORE
store
=
(
PWINECRYPT_CERTSTORE
)
hCertStore
;
PWINECRYPT_CERTSTORE
store
=
hCertStore
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
PCCERT_CONTEXT
toAdd
=
NULL
,
existing
=
NULL
;
PCCERT_CONTEXT
toAdd
=
NULL
,
existing
=
NULL
;
...
@@ -944,7 +944,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
...
@@ -944,7 +944,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT
WINAPI
CertEnumCertificatesInStore
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
WINAPI
CertEnumCertificatesInStore
(
HCERTSTORE
hCertStore
,
PCCERT_CONTEXT
pPrev
)
PCCERT_CONTEXT
pPrev
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
(
WINECRYPT_CERTSTORE
*
)
hCertStore
;
WINECRYPT_CERTSTORE
*
hcs
=
hCertStore
;
PCCERT_CONTEXT
ret
;
PCCERT_CONTEXT
ret
;
TRACE
(
"(%p, %p)
\n
"
,
hCertStore
,
pPrev
);
TRACE
(
"(%p, %p)
\n
"
,
hCertStore
,
pPrev
);
...
@@ -972,8 +972,7 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
...
@@ -972,8 +972,7 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
}
}
else
else
{
{
PWINECRYPT_CERTSTORE
hcs
=
PWINECRYPT_CERTSTORE
hcs
=
pCertContext
->
hCertStore
;
(
PWINECRYPT_CERTSTORE
)
pCertContext
->
hCertStore
;
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
ret
=
FALSE
;
...
@@ -991,7 +990,7 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
...
@@ -991,7 +990,7 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwAddDisposition
,
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwAddDisposition
,
PCCRL_CONTEXT
*
ppStoreContext
)
PCCRL_CONTEXT
*
ppStoreContext
)
{
{
PWINECRYPT_CERTSTORE
store
=
(
PWINECRYPT_CERTSTORE
)
hCertStore
;
PWINECRYPT_CERTSTORE
store
=
hCertStore
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
PCCRL_CONTEXT
toAdd
=
NULL
,
existing
=
NULL
;
PCCRL_CONTEXT
toAdd
=
NULL
,
existing
=
NULL
;
...
@@ -1111,8 +1110,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
...
@@ -1111,8 +1110,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
}
}
else
else
{
{
PWINECRYPT_CERTSTORE
hcs
=
PWINECRYPT_CERTSTORE
hcs
=
pCrlContext
->
hCertStore
;
(
PWINECRYPT_CERTSTORE
)
pCrlContext
->
hCertStore
;
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
ret
=
FALSE
;
...
@@ -1126,7 +1124,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
...
@@ -1126,7 +1124,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
PCCRL_CONTEXT
WINAPI
CertEnumCRLsInStore
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
WINAPI
CertEnumCRLsInStore
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
pPrev
)
PCCRL_CONTEXT
pPrev
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
(
WINECRYPT_CERTSTORE
*
)
hCertStore
;
WINECRYPT_CERTSTORE
*
hcs
=
hCertStore
;
PCCRL_CONTEXT
ret
;
PCCRL_CONTEXT
ret
;
TRACE
(
"(%p, %p)
\n
"
,
hCertStore
,
pPrev
);
TRACE
(
"(%p, %p)
\n
"
,
hCertStore
,
pPrev
);
...
@@ -1141,7 +1139,7 @@ PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
...
@@ -1141,7 +1139,7 @@ PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
HCERTSTORE
WINAPI
CertDuplicateStore
(
HCERTSTORE
hCertStore
)
HCERTSTORE
WINAPI
CertDuplicateStore
(
HCERTSTORE
hCertStore
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
(
WINECRYPT_CERTSTORE
*
)
hCertStore
;
WINECRYPT_CERTSTORE
*
hcs
=
hCertStore
;
TRACE
(
"(%p)
\n
"
,
hCertStore
);
TRACE
(
"(%p)
\n
"
,
hCertStore
);
...
@@ -1152,7 +1150,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
...
@@ -1152,7 +1150,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
BOOL
WINAPI
CertCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
BOOL
WINAPI
CertCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
(
WINECRYPT_CERTSTORE
*
)
hCertStore
;
WINECRYPT_CERTSTORE
*
hcs
=
hCertStore
;
TRACE
(
"(%p, %08x)
\n
"
,
hCertStore
,
dwFlags
);
TRACE
(
"(%p, %08x)
\n
"
,
hCertStore
,
dwFlags
);
...
@@ -1176,7 +1174,7 @@ BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
...
@@ -1176,7 +1174,7 @@ BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
BOOL
WINAPI
CertControlStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
BOOL
WINAPI
CertControlStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
,
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
DWORD
dwCtrlType
,
void
const
*
pvCtrlPara
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
(
WINECRYPT_CERTSTORE
*
)
hCertStore
;
WINECRYPT_CERTSTORE
*
hcs
=
hCertStore
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
TRACE
(
"(%p, %08x, %d, %p)
\n
"
,
hCertStore
,
dwFlags
,
dwCtrlType
,
...
@@ -1199,7 +1197,7 @@ BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
...
@@ -1199,7 +1197,7 @@ BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
BOOL
WINAPI
CertGetStoreProperty
(
HCERTSTORE
hCertStore
,
DWORD
dwPropId
,
BOOL
WINAPI
CertGetStoreProperty
(
HCERTSTORE
hCertStore
,
DWORD
dwPropId
,
void
*
pvData
,
DWORD
*
pcbData
)
void
*
pvData
,
DWORD
*
pcbData
)
{
{
PWINECRYPT_CERTSTORE
store
=
(
PWINECRYPT_CERTSTORE
)
hCertStore
;
PWINECRYPT_CERTSTORE
store
=
hCertStore
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
...
@@ -1263,7 +1261,7 @@ BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
...
@@ -1263,7 +1261,7 @@ BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
BOOL
WINAPI
CertSetStoreProperty
(
HCERTSTORE
hCertStore
,
DWORD
dwPropId
,
BOOL
WINAPI
CertSetStoreProperty
(
HCERTSTORE
hCertStore
,
DWORD
dwPropId
,
DWORD
dwFlags
,
const
void
*
pvData
)
DWORD
dwFlags
,
const
void
*
pvData
)
{
{
PWINECRYPT_CERTSTORE
store
=
(
PWINECRYPT_CERTSTORE
)
hCertStore
;
PWINECRYPT_CERTSTORE
store
=
hCertStore
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %d, %08x, %p)
\n
"
,
hCertStore
,
dwPropId
,
dwFlags
,
pvData
);
TRACE
(
"(%p, %d, %08x, %p)
\n
"
,
hCertStore
,
dwPropId
,
dwFlags
,
pvData
);
...
@@ -1278,7 +1276,7 @@ BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
...
@@ -1278,7 +1276,7 @@ BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
default:
default:
if
(
pvData
)
if
(
pvData
)
{
{
const
CRYPT_DATA_BLOB
*
blob
=
(
const
CRYPT_DATA_BLOB
*
)
pvData
;
const
CRYPT_DATA_BLOB
*
blob
=
pvData
;
ret
=
ContextPropertyList_SetProperty
(
store
->
properties
,
dwPropId
,
ret
=
ContextPropertyList_SetProperty
(
store
->
properties
,
dwPropId
,
blob
->
pbData
,
blob
->
cbData
);
blob
->
pbData
,
blob
->
cbData
);
...
@@ -1392,7 +1390,7 @@ BOOL WINAPI CertEnumPhysicalStore(const void *pvSystemStore, DWORD dwFlags,
...
@@ -1392,7 +1390,7 @@ BOOL WINAPI CertEnumPhysicalStore(const void *pvSystemStore, DWORD dwFlags,
FIXME
(
"(%p, %08x, %p, %p): stub
\n
"
,
pvSystemStore
,
dwFlags
,
pvArg
,
FIXME
(
"(%p, %08x, %p, %p): stub
\n
"
,
pvSystemStore
,
dwFlags
,
pvArg
,
pfnEnum
);
pfnEnum
);
else
else
FIXME
(
"(%s, %08x, %p, %p): stub
\n
"
,
debugstr_w
(
(
LPCWSTR
)
pvSystemStore
),
FIXME
(
"(%s, %08x, %p, %p): stub
\n
"
,
debugstr_w
(
pvSystemStore
),
dwFlags
,
pvArg
,
dwFlags
,
pvArg
,
pfnEnum
);
pfnEnum
);
return
FALSE
;
return
FALSE
;
...
...
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