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.

127 lines
2.3 KiB

  1. ////////////////////////////////////////////////////////////////////////
  2. //
  3. // Module : Dynamic/Nshcertmgmt.h
  4. //
  5. // Purpose : Smartdefaults implementation.
  6. //
  7. // Developers Name : Bharat/Radhika
  8. //
  9. // History :
  10. //
  11. // Date Author Comments
  12. // 10-13-2001 Bharat Initial Version. V1.0
  13. //
  14. ////////////////////////////////////////////////////////////////////////
  15. #ifndef _NSHCERTMGMT_H_
  16. #define _NSHCERTMGMT_H_
  17. #define MY_ENCODING_TYPE_CERT X509_ASN_ENCODING
  18. #define BAIL_ON_WIN32ERROR(dwError) \
  19. if (dwError){ \
  20. goto error; \
  21. }
  22. #define BAILOUT goto error
  23. #define MACHINE_NAME (2048)
  24. typedef struct _cert_node
  25. {
  26. LPWSTR pszSubjectName;
  27. struct _cert_node * pNext;
  28. } CERT_NODE, *PCERT_NODE;
  29. BOOL
  30. fIsCertStoreEmpty(
  31. IN HCERTSTORE hCertStore
  32. );
  33. extern
  34. DWORD EncodeCertificateName (
  35. LPTSTR pszSubjectName,
  36. BYTE **EncodedName,
  37. DWORD *EncodedNameLength
  38. );
  39. DWORD
  40. ListCertsInStore(
  41. IN HCERTSTORE hCertStore,
  42. OUT INT_IPSEC_MM_AUTH_INFO ** ppAuthInfo,
  43. OUT PDWORD pdwNumCertificates
  44. );
  45. DWORD
  46. CopyCertificateNode(
  47. OUT PINT_IPSEC_MM_AUTH_INFO pCurrentAuth,
  48. IN PCERT_NODE pTemp
  49. );
  50. PCERT_NODE
  51. AppendCertificateNode(
  52. OUT PCERT_NODE pCertificateList,
  53. IN LPWSTR pszSubjectName
  54. );
  55. VOID
  56. FreeCertificateList(
  57. IN PCERT_NODE pCertificateList
  58. );
  59. DWORD
  60. GetCertificateName(
  61. IN CERT_NAME_BLOB * pCertNameBlob,
  62. IN LPWSTR * ppszSubjectName
  63. );
  64. DWORD
  65. GenerateCertificatesList(
  66. OUT INT_IPSEC_MM_AUTH_INFO ** ppAuthInfo,
  67. OUT PDWORD pdwNumCertificates,
  68. OUT BOOL *pfIsMyStoreEmpty
  69. );
  70. VOID
  71. FreeCertificatesList(
  72. IN INT_IPSEC_MM_AUTH_INFO * pAuthInfo,
  73. IN DWORD dwNumCertificates
  74. );
  75. BOOL
  76. FindCertificateInList(
  77. IN PCERT_NODE pCertificateList,
  78. IN LPWSTR pszSubjectName
  79. );
  80. DWORD
  81. ListCertChainsInStore(
  82. IN HCERTSTORE hCertStore,
  83. OUT INT_IPSEC_MM_AUTH_INFO ** ppAuthInfo,
  84. IN PDWORD pdwNumCertificates,
  85. IN LPCSTR pszUsageIdentifier);
  86. DWORD
  87. CopyCertificate(
  88. IN PINT_IPSEC_MM_AUTH_INFO pCurrentAuth,
  89. IN PINT_IPSEC_MM_AUTH_INFO pCurrentAuthFrom
  90. );
  91. BOOL
  92. IsDomainMember(
  93. IN LPTSTR pszMachine
  94. );
  95. DWORD
  96. SmartDefaults(
  97. IN PINT_IPSEC_MM_AUTH_INFO* ppAuthInfo,
  98. IN LPTSTR pszMachine,
  99. IN DWORD * pdwNumberOfAuth,
  100. IN BOOL bIsDomainPolicy
  101. );
  102. #endif //_NSHCERTMGMT_H_