Commit fa6b64d6 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Add CERT_STORE_ADD_NEWER support to CertAddCertificateContextToStore.

parent ab55435e
......@@ -837,6 +837,22 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
else
toAdd = CertDuplicateCertificateContext(pCertContext);
break;
case CERT_STORE_ADD_NEWER:
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);
}
else
toAdd = CertDuplicateCertificateContext(pCertContext);
break;
default:
FIXME("Unimplemented add disposition %d\n", dwAddDisposition);
ret = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment