Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: certhlp.cpp
  8. //
  9. // Contents: Microsoft Internet Security Trust Provider
  10. //
  11. // Functions: WTHelperCertIsSelfSigned
  12. // WTHelperCertFindIssuerCertificate
  13. //
  14. // *** local functions ***
  15. //
  16. // History: 20-Oct-1997 pberkman created
  17. //
  18. //--------------------------------------------------------------------------
  19. #include "global.hxx"
  20. BOOL WINAPI WTHelperCertIsSelfSigned(DWORD dwEncoding, CERT_INFO *pCert)
  21. {
  22. if (!(CertCompareCertificateName(dwEncoding,
  23. &pCert->Issuer,
  24. &pCert->Subject)))
  25. {
  26. return(FALSE);
  27. }
  28. return(TRUE);
  29. }
  30. PCCERT_CONTEXT WINAPI WTHelperCertFindIssuerCertificate(PCCERT_CONTEXT pChildContext,
  31. DWORD chStores,
  32. HCERTSTORE *pahStores,
  33. FILETIME *psftVerifyAsOf,
  34. DWORD dwEncoding,
  35. DWORD *pdwConfidence,
  36. DWORD *pdwError)
  37. {
  38. return(TrustFindIssuerCertificate(pChildContext, dwEncoding, chStores, pahStores,
  39. psftVerifyAsOf, pdwConfidence, pdwError, 0));
  40. }