xref: /freebsd/crypto/krb5/src/lib/krb5/krb/auth_con.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 
3 #ifndef KRB5_AUTH_CONTEXT
4 #define KRB5_AUTH_CONTEXT
5 
6 #include "../rcache/memrcache.h"
7 
8 struct _krb5_auth_context {
9     krb5_magic          magic;
10     krb5_address      * remote_addr;
11     krb5_address      * remote_port;
12     krb5_address      * local_addr;
13     krb5_address      * local_port;
14     krb5_key            key;
15     krb5_key            send_subkey;
16     krb5_key            recv_subkey;
17 
18     krb5_int32          auth_context_flags;
19     krb5_ui_4           remote_seq_number;
20     krb5_ui_4           local_seq_number;
21     krb5_authenticator *authentp;               /* mk_req, rd_req, mk_rep, ...*/
22     krb5_cksumtype      req_cksumtype;          /* mk_safe, ... */
23     krb5_cksumtype      safe_cksumtype;         /* mk_safe, ... */
24     krb5_data           cstate;                 /* mk_priv, rd_priv only */
25     krb5_rcache         rcache;
26     k5_memrcache        memrcache;
27     krb5_enctype      * permitted_etypes;       /* rd_req */
28     krb5_mk_req_checksum_func checksum_func;
29     void *checksum_func_data;
30     krb5_enctype        negotiated_etype;
31     krb5_authdata_context   ad_context;
32 };
33 
34 
35 /* Internal auth_context_flags */
36 #define KRB5_AUTH_CONN_INITIALIZED      0x00010000
37 #define KRB5_AUTH_CONN_USED_W_MK_REQ    0x00020000
38 #define KRB5_AUTH_CONN_USED_W_RD_REQ    0x00040000
39 #define KRB5_AUTH_CONN_SANE_SEQ         0x00080000
40 #define KRB5_AUTH_CONN_HEIMDAL_SEQ      0x00100000
41 
42 #endif
43