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.

158 lines
3.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1999.
  5. //
  6. // File: sslsp.h
  7. //
  8. // Contents: Public Definitions for SCHANNEL Security Provider
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History
  15. //
  16. // 11 Jun 96 Merged SSL and PCT headers
  17. //
  18. //----------------------------------------------------------------------------
  19. #ifndef __SSLSP_H__
  20. #define __SSLSP_H__
  21. #if _MSC_VER > 1000
  22. #pragma once
  23. #endif
  24. #define SSLSP_NAME_A "Microsoft SSL"
  25. #define SSLSP_NAME_W L"Microsoft SSL"
  26. #ifdef UNICODE
  27. #define SSLSP_NAME SSLSP_NAME_W
  28. #else
  29. #define SSLSP_NAME SSLSP_NAME_A
  30. #endif
  31. #define SSLSP_RPC_ID 12
  32. typedef struct _SSL_CREDENTIAL_CERTIFICATE {
  33. DWORD cbPrivateKey;
  34. PBYTE pPrivateKey;
  35. DWORD cbCertificate;
  36. PBYTE pCertificate;
  37. PSTR pszPassword;
  38. } SSL_CREDENTIAL_CERTIFICATE, * PSSL_CREDENTIAL_CERTIFICATE;
  39. #define NETWORK_DREP 0x00000000
  40. #ifndef __SCHN_CERTIFICATE_DEFINED
  41. #define __SCHN_CERTIFICATE_DEFINED
  42. typedef struct _X509Certificate {
  43. DWORD Version;
  44. DWORD SerialNumber[4];
  45. ALG_ID SignatureAlgorithm;
  46. FILETIME ValidFrom;
  47. FILETIME ValidUntil;
  48. PSTR pszIssuer;
  49. PSTR pszSubject;
  50. PVOID pPublicKey;
  51. } X509Certificate, * PX509Certificate;
  52. #endif
  53. typedef struct _CtPublicPublicKey {
  54. DWORD Type;
  55. DWORD cbKey;
  56. DWORD magic;
  57. DWORD keylen;
  58. DWORD bitlen;
  59. } CtPublicPublicKey, * LPPUBLIC_KEY;
  60. #define SERIALNUMBER_LENGTH 16
  61. #define CF_VERIFY_SIG 1
  62. #define CF_CERT_FROM_FILE 2
  63. #define CERT_HEADER_LEN 17
  64. #ifdef __cplusplus
  65. extern "C" {
  66. #endif
  67. BOOL
  68. WINAPI
  69. SslGenerateKeyPair(
  70. PSSL_CREDENTIAL_CERTIFICATE pCerts,
  71. PSTR pszDN,
  72. PSTR pszPassword,
  73. DWORD Bits );
  74. VOID
  75. WINAPI
  76. SslGenerateRandomBits(
  77. PUCHAR pRandomData,
  78. LONG cRandomData
  79. );
  80. BOOL
  81. WINAPI
  82. SslLoadCertificate(
  83. PUCHAR pbCertificate,
  84. DWORD cbCertificate,
  85. BOOL AddToWellKnownKeys);
  86. BOOL
  87. WINAPI
  88. SslCrackCertificate(
  89. PUCHAR pbCertificate,
  90. DWORD cbCertificate,
  91. DWORD dwFlags,
  92. PX509Certificate * ppCertificate);
  93. VOID
  94. WINAPI
  95. SslFreeCertificate(
  96. PX509Certificate pCertificate);
  97. DWORD
  98. WINAPI
  99. SslGetMaximumKeySize(
  100. DWORD Reserved );
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. //
  105. // PCT Provider Information
  106. //
  107. #define PCTSP_NAME_A "Microsoft PCT"
  108. #define PCTSP_NAME_W L"Microsoft PCT"
  109. #ifdef UNICODE
  110. #define PCTSP_NAME PCTSP_NAME_W
  111. #else
  112. #define PCTSP_NAME PCTSP_NAME_A
  113. #endif
  114. #define PCTSP_RPC_ID 13
  115. typedef struct _PCT_CREDENTIAL_CERTIFICATE {
  116. DWORD cbPrivateKey;
  117. PBYTE pPrivateKey;
  118. DWORD cbCertificate;
  119. PBYTE pCertificate;
  120. PCHAR pszPassword;
  121. } PCT_CREDENTIAL_CERTIFICATE, * PPCT_CREDENTIAL_CERTIFICATE;
  122. #endif