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.

72 lines
2.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: origin.h
  7. //
  8. // Contents: Crypt Origin Identifier Definitions
  9. //
  10. // History: 10-Sep-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__ORIGIN_H__)
  14. #define __ORIGIN_H__
  15. #include <md5.h>
  16. //
  17. // A CRYPT_ORIGIN_IDENTIFIER is an MD5 hash of selected components of a
  18. // CAPI2 object. This allows a unique identifier to be derived for any
  19. // CAPI2 object where any two objects with the same origin identifier
  20. // are the same object at possibly different points in its evolution.
  21. // If those objects have the same HASH id then they are the same object
  22. // at the same point in time. For the main CAPI2 objects the selected
  23. // components are as follows:
  24. //
  25. // All objects: Issuer public key
  26. //
  27. // Certificate: Issuer Name, Subject Name, Public Key
  28. //
  29. // CTL: Appropriate Issuer Name and Issuer Serial No., Usage, List Identifier
  30. //
  31. // CRL: Issuer Name (an issuer can only publish ONE CRL, Hygiene work in
  32. // progress)
  33. //
  34. typedef BYTE CRYPT_ORIGIN_IDENTIFIER[ MD5DIGESTLEN ];
  35. //
  36. // Function prototypes
  37. //
  38. BOOL WINAPI CertGetOriginIdentifier (
  39. IN PCCERT_CONTEXT pCertContext,
  40. IN PCCERT_CONTEXT pIssuer,
  41. IN DWORD dwFlags,
  42. OUT CRYPT_ORIGIN_IDENTIFIER OriginIdentifier
  43. );
  44. BOOL WINAPI CtlGetOriginIdentifier (
  45. IN PCCTL_CONTEXT pCtlContext,
  46. IN PCCERT_CONTEXT pIssuer,
  47. IN DWORD dwFlags,
  48. OUT CRYPT_ORIGIN_IDENTIFIER OriginIdentifier
  49. );
  50. BOOL WINAPI CrlGetOriginIdentifier (
  51. IN PCCRL_CONTEXT pCrlContext,
  52. IN PCCERT_CONTEXT pIssuer,
  53. IN DWORD dwFlags,
  54. OUT CRYPT_ORIGIN_IDENTIFIER OriginIdentifier
  55. );
  56. BOOL WINAPI CrlGetOriginIdentifierFromSubjectCert (
  57. IN PCCERT_CONTEXT pSubjectCert,
  58. IN PCCERT_CONTEXT pIssuer,
  59. IN BOOL fFreshest,
  60. OUT CRYPT_ORIGIN_IDENTIFIER OriginIdentifier
  61. );
  62. #endif