Source code of Windows XP (NT5)
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.

164 lines
3.0 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. //
  5. // File: tlscert.h
  6. //
  7. // Contents:
  8. //
  9. // History:
  10. //
  11. //---------------------------------------------------------------------------
  12. #ifndef __TLSCERT_H__
  13. #define __TLSCERT_H__
  14. #include "server.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. DWORD
  19. TLSValidateServerCertficates(
  20. IN HCRYPTPROV hCryptProv,
  21. IN HCERTSTORE hCertStore,
  22. IN PBYTE pbSignCert,
  23. IN DWORD cbSignCert,
  24. IN PBYTE pbExchCert,
  25. IN DWORD cbExchCert,
  26. OUT FILETIME* pftExpireTime
  27. );
  28. DWORD
  29. TLSDestroyCryptContext(
  30. HCRYPTPROV hCryptProv
  31. );
  32. DWORD
  33. TLSLoadSavedCryptKeyFromLsa(
  34. OUT PBYTE* ppbSignKey,
  35. OUT PDWORD pcbSignKey,
  36. OUT PBYTE* ppbExchKey,
  37. OUT PDWORD pcbExchKey
  38. );
  39. DWORD
  40. TLSSaveCryptKeyToLsa(
  41. IN PBYTE pbSignKey,
  42. IN DWORD cbSignKey,
  43. IN PBYTE pbExchKey,
  44. IN DWORD cbExchKey
  45. );
  46. DWORD
  47. TLSCryptGenerateNewKeys(
  48. OUT PBYTE* pbSignKey,
  49. OUT DWORD* cbSignKey,
  50. OUT PBYTE* pbExchKey,
  51. OUT DWORD* cbExchKey
  52. );
  53. DWORD
  54. TLSImportSavedKey(
  55. IN HCRYPTPROV hCryptProv,
  56. IN PBYTE pbSignKey,
  57. IN DWORD cbSignKey,
  58. IN PBYTE pbExchKey,
  59. IN DWORD cbExchKey,
  60. OUT HCRYPTKEY* pSignKey,
  61. OUT HCRYPTKEY* pExchKey
  62. );
  63. DWORD
  64. TLSLoadSelfSignCertificates(
  65. IN HCRYPTPROV hCryptProv,
  66. IN PBYTE pbSPK,
  67. IN DWORD cbSPK,
  68. OUT PDWORD pcbSignCert,
  69. OUT PBYTE* ppbSignCert,
  70. OUT PDWORD pcbExchCert,
  71. OUT PBYTE* ppbExchCert
  72. );
  73. DWORD
  74. TLSLoadCHEndosedCertificate(
  75. PDWORD pcbSignCert,
  76. PBYTE* ppbSignCert,
  77. PDWORD pcbExchCert,
  78. PBYTE* ppbExchCert
  79. );
  80. DWORD
  81. TLSInstallLsCertificate(
  82. DWORD cbLsSignCert,
  83. PBYTE pbLsSignCert,
  84. DWORD cbLsExchCert,
  85. PBYTE pbLsExchCert
  86. );
  87. DWORD
  88. TLSUninstallLsCertificate();
  89. DWORD
  90. TLSServiceInitCryptoProv(
  91. IN BOOL bCreateNewKey,
  92. IN LPCTSTR pszKeyContainer,
  93. OUT HCRYPTPROV* phCryptProv,
  94. OUT HCRYPTKEY* phSignKey,
  95. OUT HCRYPTKEY* phExchKey
  96. );
  97. DWORD
  98. TLSInitCryptoProv(
  99. IN LPCTSTR pszKeyContainer,
  100. IN PBYTE pbSignKey,
  101. IN DWORD cbSignKey,
  102. IN PBYTE pbExchKey,
  103. IN DWORD cbExchKey,
  104. OUT HCRYPTPROV* phCryptProv,
  105. OUT HCRYPTKEY* phSignKey,
  106. OUT HCRYPTKEY* phExchKey
  107. );
  108. DWORD
  109. TLSVerifyCertChainInMomory(
  110. IN HCRYPTPROV hCryptProv,
  111. IN PBYTE pbData,
  112. IN DWORD cbData
  113. );
  114. DWORD
  115. TLSRegDeleteKey(
  116. IN HKEY hRegKey,
  117. IN LPCTSTR pszSubKey
  118. );
  119. DWORD
  120. TLSTreeCopyRegKey(
  121. IN HKEY hSourceRegKey,
  122. IN LPCTSTR pszSourceSubKey,
  123. IN HKEY hDestRegKey,
  124. IN LPCTSTR pszDestSubKey
  125. );
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif