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
674e2372
Commit
674e2372
authored
Nov 10, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the CertStore code a little.
parent
d80247ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
8 deletions
+86
-8
cert.c
dlls/crypt32/cert.c
+84
-6
crypt32.spec
dlls/crypt32/crypt32.spec
+2
-2
No files found.
dlls/crypt32/cert.c
View file @
674e2372
...
...
@@ -25,11 +25,47 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
HCERTSTORE
WINAPI
CertOpenStore
(
LPCSTR
lpszStoreProvider
,
DWORD
dwEncodingType
,
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
)
#define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
typedef
struct
WINE_CRYPTCERTSTORE
{
DWORD
dwMagic
;
}
WINECRYPT_CERTSTORE
;
/*
* CertOpenStore
*
* System Store CA is
* HKLM\\Software\\Microsoft\\SystemCertificates\\CA\\
* Certificates\\<compressed guid>
* "Blob" = REG_BINARY
* CRLs\\<compressed guid>
* "Blob" = REG_BINARY
* CTLs\\<compressed guid>
* "Blob" = REG_BINARY
*/
HCERTSTORE
WINAPI
CertOpenStore
(
LPCSTR
lpszStoreProvider
,
DWORD
dwMsgAndCertEncodingType
,
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
)
{
FIXME
(
"(%s, %ld, %ld, %ld, %p), stub.
\n
"
,
debugstr_a
(
lpszStoreProvider
),
dwEncodingType
,
hCryptProv
,
dwFlags
,
pvPara
);
return
(
HCERTSTORE
)
1
;
WINECRYPT_CERTSTORE
*
hcs
;
FIXME
(
"%s %08lx %08lx %08lx %p stub
\n
"
,
debugstr_a
(
lpszStoreProvider
),
dwMsgAndCertEncodingType
,
hCryptProv
,
dwFlags
,
pvPara
);
if
(
lpszStoreProvider
==
(
LPCSTR
)
0x0009
)
{
FIXME
(
"pvPara = %s
\n
"
,
debugstr_a
(
(
LPCSTR
)
pvPara
)
);
}
hcs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WINECRYPT_CERTSTORE
)
);
if
(
!
hcs
)
return
NULL
;
hcs
->
dwMagic
=
WINE_CRYPTCERTSTORE_MAGIC
;
return
(
HCERTSTORE
)
hcs
;
}
HCERTSTORE
WINAPI
CertOpenSystemStoreA
(
HCRYPTPROV
hProv
,
...
...
@@ -63,13 +99,55 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
PCCRL_CONTEXT
WINAPI
CertCreateCRLContext
(
DWORD
dwCertEncodingType
,
const
BYTE
*
pbCrlEncoded
,
DWORD
cbCrlEncoded
)
{
FIXME
(
"%08lx %p %08lx
\n
"
,
dwCertEncodingType
,
pbCrlEncoded
,
cbCrlEncoded
);
return
NULL
;
PCRL_CONTEXT
pcrl
;
BYTE
*
data
;
TRACE
(
"%08lx %p %08lx
\n
"
,
dwCertEncodingType
,
pbCrlEncoded
,
cbCrlEncoded
);
pcrl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
CRL_CONTEXT
)
);
if
(
!
pcrl
)
return
NULL
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbCrlEncoded
);
if
(
!
data
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pcrl
);
return
NULL
;
}
pcrl
->
dwCertEncodingType
=
dwCertEncodingType
;
pcrl
->
pbCrlEncoded
=
data
;
pcrl
->
cbCrlEncoded
=
cbCrlEncoded
;
pcrl
->
pCrlInfo
=
NULL
;
pcrl
->
hCertStore
=
0
;
return
pcrl
;
}
BOOL
WINAPI
CertAddCRLContextToStore
(
HCERTSTORE
hCertStore
,
PCCRL_CONTEXT
pCrlContext
,
DWORD
dwAddDisposition
,
PCCRL_CONTEXT
*
ppStoreContext
)
{
FIXME
(
"%p %p %08lx %p
\n
"
,
hCertStore
,
pCrlContext
,
dwAddDisposition
,
ppStoreContext
);
return
TRUE
;
}
BOOL
WINAPI
CertFreeCRLContext
(
PCCRL_CONTEXT
pCrlContext
)
{
FIXME
(
"%p
\n
"
,
pCrlContext
);
return
TRUE
;
}
BOOL
WINAPI
CertCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
FIXME
(
"%p %08lx
\n
"
,
hCertStore
,
dwFlags
);
if
(
!
hCertStore
)
return
FALSE
;
HeapFree
(
GetProcessHeap
(),
0
,
hCertStore
);
return
TRUE
;
}
...
...
dlls/crypt32/crypt32.spec
View file @
674e2372
@ st
ub CertAddCRLContextToStore
@ st
dcall CertAddCRLContextToStore(long ptr long ptr)
@ stub CertAddCTLContextToStore
@ stub CertAddCertificateContextToStore
@ stub CertAddEncodedCRLToStore
...
...
@@ -38,7 +38,7 @@
@ stub CertFindExtension
@ stub CertFindRDNAttr
@ stub CertFindSubjectInCTL
@ st
ub CertFreeCRLContext
@ st
dcall CertFreeCRLContext(ptr)
@ stub CertFreeCTLContext
@ stub CertFreeCertificateChain
@ stub CertFreeCertificateChainEngine
...
...
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