private unsafe DateTime?GetStatusUpdateTime(CERT_REVOCATION_INFO *pRevocationInfo) { CERT_REVOCATION_CRL_INFO *pCrlInfo = pRevocationInfo->pCrlInfo; if (pCrlInfo == null) { return(null); } if (pCrlInfo->pDeltaCRLContext != null && pCrlInfo->pDeltaCRLContext->pCrlInfo != null) { FILETIME statusUpdate = pCrlInfo->pDeltaCRLContext->pCrlInfo->ThisUpdate; return(statusUpdate.ToDateTime().ToUniversalTime()); } if (pCrlInfo->pBaseCRLContext != null && pCrlInfo->pBaseCRLContext->pCrlInfo != null) { FILETIME statusUpdate = pCrlInfo->pBaseCRLContext->pCrlInfo->ThisUpdate; return(statusUpdate.ToDateTime().ToUniversalTime()); } return(null); }
private unsafe DateTime?GetRevocationTime(CERT_REVOCATION_INFO *pRevocationInfo) { if (pRevocationInfo->dwRevocationResult == CertTrustErrorStatus.CERT_TRUST_NO_ERROR) { return(null); } FILETIME revocationDate = pRevocationInfo->pCrlInfo->pCrlEntry->RevocationDate; return(revocationDate.ToDateTime().ToUniversalTime()); }