crypt32: Get rid of no longer needed hCertStore checks.
This commit is contained in:
parent
e7ab43c4bb
commit
217e0119d9
|
@ -555,15 +555,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
|
|||
ret = FALSE;
|
||||
break;
|
||||
case CERT_ACCESS_STATE_PROP_ID:
|
||||
if (pCertContext->hCertStore)
|
||||
ret = CertGetStoreProperty(pCertContext->hCertStore, dwPropId,
|
||||
pvData, pcbData);
|
||||
else
|
||||
{
|
||||
DWORD state = 0;
|
||||
|
||||
ret = CertContext_CopyParam(pvData, pcbData, &state, sizeof(state));
|
||||
}
|
||||
ret = CertGetStoreProperty(cert->ctx.hCertStore, dwPropId, pvData, pcbData);
|
||||
break;
|
||||
case CERT_KEY_PROV_HANDLE_PROP_ID:
|
||||
{
|
||||
|
|
|
@ -499,14 +499,7 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pCRLContext->hCertStore)
|
||||
ret = CertGetStoreProperty(pCRLContext->hCertStore, dwPropId,
|
||||
pvData, pcbData);
|
||||
else
|
||||
{
|
||||
*(DWORD *)pvData = 0;
|
||||
ret = TRUE;
|
||||
}
|
||||
ret = CertGetStoreProperty(pCRLContext->hCertStore, dwPropId, pvData, pcbData);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -341,26 +341,21 @@ PCCTL_CONTEXT WINAPI CertFindCTLInStore(HCERTSTORE hCertStore,
|
|||
|
||||
BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = pCtlContext->hCertStore;
|
||||
ctl_t *ctl = ctl_from_ptr(pCtlContext);
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p)\n", pCtlContext);
|
||||
|
||||
if (!pCtlContext)
|
||||
ret = TRUE;
|
||||
else if (!pCtlContext->hCertStore)
|
||||
ret = CertFreeCTLContext(pCtlContext);
|
||||
else
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = pCtlContext->hCertStore;
|
||||
ctl_t *ctl = ctl_from_ptr(pCtlContext);
|
||||
return TRUE;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
ret = hcs->vtbl->ctls.delete(hcs, &ctl->base);
|
||||
if (ret)
|
||||
ret = CertFreeCTLContext(pCtlContext);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -621,14 +616,7 @@ BOOL WINAPI CertGetCTLContextProperty(PCCTL_CONTEXT pCTLContext,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pCTLContext->hCertStore)
|
||||
ret = CertGetStoreProperty(pCTLContext->hCertStore, dwPropId,
|
||||
pvData, pcbData);
|
||||
else
|
||||
{
|
||||
*(DWORD *)pvData = 0;
|
||||
ret = TRUE;
|
||||
}
|
||||
ret = CertGetStoreProperty(pCTLContext->hCertStore, dwPropId, pvData, pcbData);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -949,24 +949,17 @@ PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_
|
|||
|
||||
BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
|
||||
{
|
||||
BOOL ret;
|
||||
WINECRYPT_CERTSTORE *hcs = pCertContext->hCertStore;
|
||||
|
||||
TRACE("(%p)\n", pCertContext);
|
||||
|
||||
if (!pCertContext)
|
||||
ret = TRUE;
|
||||
else if (!pCertContext->hCertStore)
|
||||
ret = CertFreeCertificateContext(pCertContext);
|
||||
else
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = pCertContext->hCertStore;
|
||||
return TRUE;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
else
|
||||
ret = hcs->vtbl->certs.delete(hcs, &cert_from_ptr(pCertContext)->base);
|
||||
}
|
||||
return ret;
|
||||
return FALSE;
|
||||
|
||||
return hcs->vtbl->certs.delete(hcs, &cert_from_ptr(pCertContext)->base);
|
||||
}
|
||||
|
||||
BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
|
||||
|
@ -1091,25 +1084,20 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
|
|||
|
||||
BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = pCrlContext->hCertStore;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p)\n", pCrlContext);
|
||||
|
||||
if (!pCrlContext)
|
||||
ret = TRUE;
|
||||
else if (!pCrlContext->hCertStore)
|
||||
ret = CertFreeCRLContext(pCrlContext);
|
||||
else
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = pCrlContext->hCertStore;
|
||||
return TRUE;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
ret = hcs->vtbl->crls.delete(hcs, &crl_from_ptr(pCrlContext)->base);
|
||||
if (ret)
|
||||
ret = CertFreeCRLContext(pCrlContext);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue