1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
8 #include <limits.h> /* For INT_MAX */
14 * If KRB5_MSGTYPE_STRICT is defined, then be strict about checking
15 * the msgtype fields. Unfortunately, there old versions of Kerberos
16 * don't set these fields correctly, so we have to make allowances for
19 /* #define KRB5_MSGTYPE_STRICT */
22 * If KRB5_GENEROUS_LR_TYPE is defined, then we are generous about
23 * accepting a one byte negative lr_type - which is not sign
24 * extended. Prior to July 2000, we were sending a negative lr_type as
25 * a positve single byte value - instead of a signed integer. This
26 * allows us to receive the old value and deal
28 #define KRB5_GENEROUS_LR_TYPE
30 typedef krb5_octet asn1_octet;
31 typedef krb5_error_code asn1_error_code;
33 typedef enum { PRIMITIVE = 0x00, CONSTRUCTED = 0x20 } asn1_construction;
35 typedef enum { UNIVERSAL = 0x00, APPLICATION = 0x40,
36 CONTEXT_SPECIFIC = 0x80, PRIVATE = 0xC0 } asn1_class;
38 typedef int asn1_tagnum;
39 #define ASN1_TAGNUM_CEILING INT_MAX
40 #define ASN1_TAGNUM_MAX (ASN1_TAGNUM_CEILING-1)
42 /* This is Kerberos Version 5 */
45 /* Universal Tag Numbers */
46 #define ASN1_BOOLEAN 1
47 #define ASN1_INTEGER 2
48 #define ASN1_BITSTRING 3
49 #define ASN1_OCTETSTRING 4
51 #define ASN1_OBJECTIDENTIFIER 6
52 #define ASN1_ENUMERATED 10
53 #define ASN1_UTF8STRING 12
54 #define ASN1_SEQUENCE 16
56 #define ASN1_PRINTABLESTRING 19
57 #define ASN1_IA5STRING 22
58 #define ASN1_UTCTIME 23
59 #define ASN1_GENERALTIME 24
60 #define ASN1_GENERALSTRING 27
62 /* Kerberos Message Types */
63 #define ASN1_KRB_AS_REQ 10
64 #define ASN1_KRB_AS_REP 11
65 #define ASN1_KRB_TGS_REQ 12
66 #define ASN1_KRB_TGS_REP 13
67 #define ASN1_KRB_AP_REQ 14
68 #define ASN1_KRB_AP_REP 15
69 #define ASN1_KRB_SAFE 20
70 #define ASN1_KRB_PRIV 21
71 #define ASN1_KRB_CRED 22
72 #define ASN1_KRB_ERROR 30