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.

60 lines
1.2 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. //
  5. // File:
  6. //
  7. // Contents:
  8. //
  9. // History:
  10. //
  11. //---------------------------------------------------------------------------
  12. #ifndef __TLSTRUST_H__
  13. #define __TLSTRUST_H__
  14. #define RANDOM_CHALLENGE_DATASIZE 32 // 128 bits data.
  15. #define RUN_MD5_HASH_TIMES 5 // time to hash data.
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. DWORD WINAPI
  20. TLSEstablishTrustWithServer(
  21. IN TLS_HANDLE hHandle,
  22. IN HCRYPTPROV hCryptProv,
  23. IN DWORD dwClientType,
  24. OUT PDWORD pdwErrCode
  25. );
  26. DWORD WINAPI
  27. TLSGenerateRandomChallengeData(
  28. IN HCRYPTPROV hCryptProv,
  29. IN PBYTE* ppbChallengeData,
  30. IN PDWORD pcbChallengeData
  31. );
  32. DWORD WINAPI
  33. TLSVerifyChallengeResponse(
  34. IN HCRYPTPROV hCryptProv,
  35. IN DWORD dwClientType,
  36. IN PTLSCHALLENGEDATA pClientChallengeData,
  37. IN PTLSCHALLENGERESPONSEDATA pServerChallengeResponseData
  38. );
  39. DWORD
  40. TLSGenerateChallengeResponseData(
  41. IN HCRYPTPROV hCryptProv,
  42. IN DWORD dwClientType,
  43. IN PTLSCHALLENGEDATA pChallengeData,
  44. OUT PBYTE* pbResponseData,
  45. OUT PDWORD cbResponseData
  46. );
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif