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.

118 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. dnssec.h
  5. Abstract:
  6. Domain Name System (DNS) Library
  7. Private security definitions.
  8. This header necessary to provide defs to client secure update
  9. routines which are in dnsapi (update.c).
  10. Author:
  11. Jim Gilroy (jamesg) November 1997
  12. Revision History:
  13. --*/
  14. #ifndef _DNS_DNSSEC_INCLUDED_
  15. #define _DNS_DNSSEC_INCLUDED_
  16. #define SECURITY_WIN32
  17. #include "sspi.h"
  18. #include "issperr.h"
  19. //
  20. // Context "key" for TKEYs
  21. //
  22. typedef struct _DNS_SECCTXT_KEY
  23. {
  24. DNS_ADDR RemoteAddr;
  25. PSTR pszTkeyName;
  26. PSTR pszClientContext;
  27. PWSTR pwsCredKey;
  28. }
  29. DNS_SECCTXT_KEY, *PDNS_SECCTXT_KEY;
  30. //
  31. // Security context
  32. //
  33. typedef struct _DnsSecurityContext
  34. {
  35. struct _DnsSecurityContext * pNext;
  36. struct _SecHandle hSecHandle;
  37. DNS_SECCTXT_KEY Key;
  38. CredHandle CredHandle;
  39. // context info
  40. DWORD Version;
  41. WORD TkeySize;
  42. // context state
  43. BOOL fClient;
  44. BOOL fHaveCredHandle;
  45. BOOL fHaveSecHandle;
  46. BOOL fNegoComplete;
  47. DWORD UseCount;
  48. // timeout
  49. DWORD dwCreateTime;
  50. DWORD dwCleanupTime;
  51. DWORD dwExpireTime;
  52. }
  53. SEC_CNTXT, *PSEC_CNTXT;
  54. //
  55. // Security session info.
  56. // Held only during interaction, not cached
  57. //
  58. typedef struct _SecPacketInfo
  59. {
  60. PSEC_CNTXT pSecContext;
  61. SecBuffer RemoteBuf;
  62. SecBuffer LocalBuf;
  63. PDNS_HEADER pMsgHead;
  64. PCHAR pMsgEnd;
  65. PDNS_RECORD pTsigRR;
  66. PDNS_RECORD pTkeyRR;
  67. PCHAR pszContextName;
  68. DNS_PARSED_RR ParsedRR;
  69. // client must save signature of query to verify sig on response
  70. PCHAR pQuerySig;
  71. WORD QuerySigLength;
  72. WORD ExtendedRcode;
  73. // version on TKEY \ TSIG
  74. DWORD TkeyVersion;
  75. }
  76. SECPACK, *PSECPACK;
  77. #endif // _DNS_DNSSEC_INCLUDED_