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
cefe8820
Commit
cefe8820
authored
Dec 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support add disposition CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES.
parent
f2b98325
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
ctl.c
dlls/crypt32/ctl.c
+21
-0
store.c
dlls/crypt32/store.c
+40
-0
No files found.
dlls/crypt32/ctl.c
View file @
cefe8820
...
...
@@ -82,6 +82,27 @@ BOOL WINAPI CertAddCTLContextToStore(HCERTSTORE hCertStore,
else
toAdd
=
CertDuplicateCTLContext
(
pCtlContext
);
break
;
case
CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
:
if
(
existing
)
{
LONG
newer
=
CompareFileTime
(
&
existing
->
pCtlInfo
->
ThisUpdate
,
&
pCtlContext
->
pCtlInfo
->
ThisUpdate
);
if
(
newer
<
0
)
{
toAdd
=
CertDuplicateCTLContext
(
pCtlContext
);
CtlContext_CopyProperties
(
existing
,
pCtlContext
);
}
else
{
TRACE
(
"existing CTL is newer, not adding
\n
"
);
SetLastError
(
CRYPT_E_EXISTS
);
ret
=
FALSE
;
}
}
else
toAdd
=
CertDuplicateCTLContext
(
pCtlContext
);
break
;
case
CERT_STORE_ADD_REPLACE_EXISTING
:
toAdd
=
CertDuplicateCTLContext
(
pCtlContext
);
break
;
...
...
dlls/crypt32/store.c
View file @
cefe8820
...
...
@@ -893,6 +893,25 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
else
toAdd
=
CertDuplicateCertificateContext
(
pCertContext
);
break
;
case
CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
:
if
(
existing
)
{
if
(
CompareFileTime
(
&
existing
->
pCertInfo
->
NotBefore
,
&
pCertContext
->
pCertInfo
->
NotBefore
)
>=
0
)
{
TRACE
(
"existing certificate is newer, not adding
\n
"
);
SetLastError
(
CRYPT_E_EXISTS
);
ret
=
FALSE
;
}
else
{
toAdd
=
CertDuplicateCertificateContext
(
pCertContext
);
CertContext_CopyProperties
(
toAdd
,
existing
);
}
}
else
toAdd
=
CertDuplicateCertificateContext
(
pCertContext
);
break
;
default:
FIXME
(
"Unimplemented add disposition %d
\n
"
,
dwAddDisposition
);
SetLastError
(
E_INVALIDARG
);
...
...
@@ -1016,6 +1035,27 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
else
toAdd
=
CertDuplicateCRLContext
(
pCrlContext
);
break
;
case
CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
:
if
(
existing
)
{
LONG
newer
=
CompareFileTime
(
&
existing
->
pCrlInfo
->
ThisUpdate
,
&
pCrlContext
->
pCrlInfo
->
ThisUpdate
);
if
(
newer
<
0
)
{
toAdd
=
CertDuplicateCRLContext
(
pCrlContext
);
CrlContext_CopyProperties
(
toAdd
,
existing
);
}
else
{
TRACE
(
"existing CRL is newer, not adding
\n
"
);
SetLastError
(
CRYPT_E_EXISTS
);
ret
=
FALSE
;
}
}
else
toAdd
=
CertDuplicateCRLContext
(
pCrlContext
);
break
;
case
CERT_STORE_ADD_REPLACE_EXISTING
:
toAdd
=
CertDuplicateCRLContext
(
pCrlContext
);
break
;
...
...
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