From 53e546680770b612d8ed293224bb2ac601be5835 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 1 Dec 1989 17:15:31 +0000 Subject: [PATCH] add lots of structures, plus some include files git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@43 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/krb5.h | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/src/include/krb5/krb5.h b/src/include/krb5/krb5.h index 54feb7137..b862cf1d9 100644 --- a/src/include/krb5/krb5.h +++ b/src/include/krb5/krb5.h @@ -22,5 +22,77 @@ #include #include #include +#include +#include +#include +typedef krb5_string * krb5_principal; /* array of strings */ + /* CONVENTION: realm is first elem. */ + +/* Time set */ +typedef struct _krb5_ticket_times { + krb5_timestamp authtime; /* XXX ? should ktime in KDC_REP == authtime + in ticket? otherwise client can't get this */ + krb5_timestamp starttime; + krb5_timestamp endtime; + krb5_timestamp renew_till; +} krb5_ticket_times; + +/* the unencrypted version */ +typedef struct _krb5_ticket { + /* cleartext portion */ + krb5_principal server; /* server name/realm */ + krb5_enctype etype; /* ticket encryption type */ + krb5_kvno skvno; /* server kvno */ + /* to-be-encrypted portion */ + krb5_confounder confounder; /* confounder */ + krb5_flags flags; /* flags */ + krb5_keyblock *session; /* session key: includes keytype */ + krb5_principal client; /* client name/realm */ + krb5_string transited; /* list of transited realms */ + krb5_ticket_times times; /* auth, start, end, renew_till */ + krb5_address **caddrs; /* array of ptrs to addresses */ + krb5_string authorization_data; /* auth data */ +} krb5_ticket; + +/* the unencrypted version */ +typedef struct _krb5_authenticator { + krb5_principal client; /* client name/realm */ + krb5_checksum *checksum; /* checksum, includes type */ + krb5_ui_2 cmsec; /* client msec portion */ + krb5_timestamp cmsec; /* client sec portion */ +} krb5_authenticator; + +/* credentials: Ticket, session key, etc. */ +typedef struct _krb5_credentials { + krb5_principal client; /* client's principal identifier */ + krb5_principal server; /* server's principal identifier */ + krb5_encrypt_block keyblock; /* session encryption key info */ + krb5_ticket_times times; /* lifetime info */ + krb5_flags ticket_flags; /* flags in ticket */ + krb5_string ticket; /* ticket string itself */ +} krb5_credentials; + +/* Last request fields */ +typedef struct _krb5_last_req_entry { + krb5_ui_4 value; + octet lr_type; +} krb5_last_req_entry; + +typedef struct _krb5_kdc_rep { + /* cleartext part: */ + krb5_principal client; /* client's principal identifier */ + krb5_enctype etype; /* encryption type */ + krb5_kvno ckvno; /* client key version */ + krb5_string ticket; /* ticket (already encrypted) */ + /* encrypted part: */ + krb5_confounder confounder; /* confounder */ + krb5_keyblock *session; /* session key */ + krb5_last_req_entry *last_req; /* array of ptrs to entries */ + krb5_ticket_times times; /* lifetime info */ + krb5_timestamp key_exp; /* expiration date */ + krb5_flags flags; /* ticket flags */ + krb5_principal server; /* server's principal identifier */ + krb5_address **caddrs; /* array of ptrs to addresses */ +} krb5_kdc_rep; #endif /* __KRB5_GENERAL__ */ -- 2.26.2