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.

120 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. inetsspi.h
  5. Abstract:
  6. Contains all constant values and prototype decls used in inetsspi.cxx
  7. Author:
  8. Sophia Chung (SophiaC) 02-Jan-1996
  9. Revision History:
  10. --*/
  11. #ifndef _INETSSPI_H_
  12. #define _INETSSPI_H_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. //
  17. // Encryption Capabilities
  18. //
  19. #define ENC_CAPS_NOT_INSTALLED 0x80000000 // No keys installed
  20. #define ENC_CAPS_DISABLED 0x40000000 // Disabled due to locale
  21. #define ENC_CAPS_SSL 0x00000001 // SSL active
  22. #define ENC_CAPS_PCT 0x00000002 // PCT active
  23. #define ENC_CAPS_SCHANNEL_CREDS 0x00000004 // Uses SCHANNEL Creds Struct
  24. //
  25. // Encryption type (SSL/PCT etc) portion of encryption flag dword
  26. // PCT & SSL are both supported
  27. //
  28. #define ENC_CAPS_TYPE_MASK (ENC_CAPS_SSL | ENC_CAPS_PCT)
  29. #define ENC_CAPS_DEFAULT ENC_CAPS_TYPE_MASK
  30. #define INVALID_CRED_VALUE {0xFFFFFFFF, 0xFFFFFFFF}
  31. #define IS_CRED_INVALID(s) (((s)->dwUpper == 0xFFFFFFFF) && ((s)->dwLower == 0xFFFFFFFF))
  32. typedef struct _SEC_PROVIDER
  33. {
  34. CHAR *pszName; // security pkg name
  35. CredHandle hCreds; // credential handle
  36. DWORD dwFlags; // encryption capabilities
  37. BOOL fEnabled; // enable flag indicator
  38. DWORD dwProtocolFlags; // protocol flags that this provider supports.
  39. PCCERT_CONTEXT pCertCtxt; // cert context to use when getting default credentials.
  40. } SEC_PROVIDER, *PSEC_PROVIDER;
  41. //
  42. // Array of encryption providers
  43. //
  44. extern SEC_PROVIDER SecProviders[];
  45. //
  46. // Global EncProvider flag
  47. //
  48. extern DWORD dwEncFlags;
  49. //
  50. // Prototypes
  51. //
  52. BOOL
  53. SecurityPkgInitialize(
  54. BOOL fForce = FALSE
  55. );
  56. DWORD
  57. EncryptData(
  58. IN CtxtHandle* hContext,
  59. IN LPVOID lpBuffer,
  60. IN DWORD dwInBufferLen,
  61. OUT LPVOID *lplpBuffer,
  62. OUT DWORD *lpdwOutBufferLen,
  63. OUT DWORD *lpdwInBufferBytesEncrypted
  64. );
  65. DWORD
  66. DecryptData(
  67. IN CtxtHandle* hContext,
  68. IN OUT DBLBUFFER* pdblbufBuffer,
  69. OUT DWORD *lpdwBytesNeeded,
  70. OUT LPBYTE lpOutBuffer,
  71. IN OUT DWORD *lpdwOutBufferLeft,
  72. IN OUT DWORD *lpdwOutBufferReceived,
  73. IN OUT DWORD *lpdwOutBufferBytesRead
  74. );
  75. VOID
  76. TerminateSecConnection(
  77. IN CtxtHandle* hContext
  78. );
  79. DWORD
  80. QuerySecurityInfo(
  81. IN CtxtHandle *hContext,
  82. OUT LPINTERNET_SECURITY_INFO pInfo);
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif //_INETSSPI_H_