home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / kerbcon.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  105 lines

  1. //+-----------------------------------------------------------------------
  2. //
  3. // File:        KERBCON.H
  4. //
  5. // Contents:    Microsoft Kerberos constants
  6. //
  7. //
  8. // History:     25 Feb 92   RichardW    Compiled from other files
  9. //
  10. //------------------------------------------------------------------------
  11.  
  12. #ifndef __KERBCON_H__
  13. #define __KERBCON_H__
  14.  
  15.  
  16. // Revision of the Kerberos Protocol.  MS uses Version 5, Revision 6
  17.  
  18. #define KERBEROS_VERSION    5
  19. #define KERBEROS_REVISION   6
  20.  
  21.  
  22.  
  23. // Encryption Types:
  24. // These encryption types are supported by the default MS KERBSUPP DLL
  25. // as crypto systems.  Values over 127 are local values, and may be changed
  26. // without notice.
  27.  
  28. #define KERB_ETYPE_NULL             0
  29. #define KERB_ETYPE_DES_CBC_CRC      1
  30. #define KERB_ETYPE_DES_CBC_MD4      2
  31. #define KERB_ETYPE_DES_CBC_MD5      3
  32.  
  33. #define KERB_ETYPE_OLD_RC4_MD4          128
  34. #define KERB_ETYPE_OLD_RC4_PLAIN        129
  35. #define KERB_ETYPE_OLD_RC4_LM           130
  36. #define KERB_ETYPE_OLD_RC4_SHA          131
  37. #define KERB_ETYPE_OLD_DES_PLAIN        132
  38.  
  39. #define KERB_ETYPE_RC4_MD4          -128
  40. #define KERB_ETYPE_RC4_PLAIN        -129
  41. #define KERB_ETYPE_RC4_LM           -130
  42. #define KERB_ETYPE_RC4_SHA          -131
  43. #define KERB_ETYPE_DES_PLAIN        -132
  44.  
  45.  
  46. // Checksum algorithms.
  47. // These algorithms are keyed internally for our use.
  48.  
  49. #define KERB_CHECKSUM_NONE  0
  50. #define KERB_CHECKSUM_CRC32         1
  51. #define KERB_CHECKSUM_MD4           2
  52. #define KERB_CHECKSUM_KRB_DES_MAC   4
  53. #define KERB_CHECKSUM_MD5           7
  54. #define KERB_CHECKSUM_MD5_DES       8
  55.  
  56.  
  57. #define KERB_CHECKSUM_OLD_LM            130
  58. #define KERB_CHECKSUM_OLD_SHA1          131
  59. #define KERB_CHECKSUM_OLD_REAL_CRC32    132
  60. #define KERB_CHECKSUM_OLD_DES_MAC       133
  61. #define KERB_CHECKSUM_OLD_DES_MAC_MD5   134
  62. #define KERB_CHECKSUM_OLD_MD25          135
  63. #define KERB_CHECKSUM_OLD_RC4_MD5       136
  64.  
  65.  
  66. #define KERB_CHECKSUM_LM            -130
  67. #define KERB_CHECKSUM_SHA1          -131
  68. #define KERB_CHECKSUM_REAL_CRC32    -132
  69. #define KERB_CHECKSUM_DES_MAC       -133
  70. #define KERB_CHECKSUM_DES_MAC_MD5   -134
  71. #define KERB_CHECKSUM_MD25          -135
  72. #define KERB_CHECKSUM_RC4_MD5       -136
  73.  
  74.  
  75. #define AUTH_REQ_ALLOW_FORWARDABLE      0x00000001
  76. #define AUTH_REQ_ALLOW_PROXIABLE        0x00000002
  77. #define AUTH_REQ_ALLOW_POSTDATE         0x00000004
  78. #define AUTH_REQ_ALLOW_RENEWABLE        0x00000008
  79. #define AUTH_REQ_ALLOW_NOADDRESS        0x00000010
  80. #define AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY  0x00000020
  81. #define AUTH_REQ_ALLOW_VALIDATE         0x00000040
  82. #define AUTH_REQ_VALIDATE_CLIENT        0x00000080
  83. #define AUTH_REQ_OK_AS_DELEGATE         0x00000100
  84.  
  85.  
  86. //
  87. // KDC auditing flags. these do not belong here for long
  88. //
  89.  
  90. #define KDC_AUDIT_AS_SUCCESS            0x1
  91. #define KDC_AUDIT_AS_FAILURE            0x2
  92. #define KDC_AUDIT_TGS_SUCCESS           0x4
  93. #define KDC_AUDIT_TGS_FAILURE           0x8
  94.  
  95. //
  96. // macro for converting auth flags & audit flags to state which may
  97. // be set through the debug function KdcSetState
  98. //
  99.  
  100. #define KDC_MAKE_STATE(AuthFlag, AuditFlag) (((AuditFlag) << 16) | ((AuthFlag) & 0xffff))
  101. #define KDC_AUTH_STATE(StateFlags) ((StateFlags) & 0xffff)
  102. #define KDC_AUDIT_STATE(StateFlags) ((StateFlags) >> 16)
  103.  
  104. #endif // __KERBCON_H__
  105.