1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 #ifndef __KRBASN1_H__ 3 #define __KRBASN1_H__ 4 5 #include "k5-int.h" 6 #include <stdio.h> 7 #include <errno.h> 8 #include <limits.h> /* For INT_MAX */ 9 #ifdef HAVE_STDLIB_H 10 #include <stdlib.h> 11 #endif 12 13 typedef krb5_error_code asn1_error_code; 14 15 typedef enum { PRIMITIVE = 0x00, CONSTRUCTED = 0x20 } asn1_construction; 16 17 typedef enum { UNIVERSAL = 0x00, APPLICATION = 0x40, 18 CONTEXT_SPECIFIC = 0x80, PRIVATE = 0xC0 } asn1_class; 19 20 typedef int asn1_tagnum; 21 #define ASN1_TAGNUM_CEILING INT_MAX 22 #define ASN1_TAGNUM_MAX (ASN1_TAGNUM_CEILING-1) 23 24 /* This is Kerberos Version 5 */ 25 #define KVNO 5 26 27 /* Universal Tag Numbers */ 28 #define ASN1_BOOLEAN 1 29 #define ASN1_INTEGER 2 30 #define ASN1_BITSTRING 3 31 #define ASN1_OCTETSTRING 4 32 #define ASN1_NULL 5 33 #define ASN1_OBJECTIDENTIFIER 6 34 #define ASN1_ENUMERATED 10 35 #define ASN1_UTF8STRING 12 36 #define ASN1_SEQUENCE 16 37 #define ASN1_SET 17 38 #define ASN1_PRINTABLESTRING 19 39 #define ASN1_IA5STRING 22 40 #define ASN1_UTCTIME 23 41 #define ASN1_GENERALTIME 24 42 #define ASN1_GENERALSTRING 27 43 44 /* Kerberos Message Types */ 45 #define ASN1_KRB_AS_REQ 10 46 #define ASN1_KRB_AS_REP 11 47 #define ASN1_KRB_TGS_REQ 12 48 #define ASN1_KRB_TGS_REP 13 49 #define ASN1_KRB_AP_REQ 14 50 #define ASN1_KRB_AP_REP 15 51 #define ASN1_KRB_SAFE 20 52 #define ASN1_KRB_PRIV 21 53 #define ASN1_KRB_CRED 22 54 #define ASN1_KRB_ERROR 30 55 56 #endif 57