1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* lib/krb5/krb/fast.h */
4 * Copyright (C) 2009 by the Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. Furthermore if you modify this software you must label
20 * your software as modified software and not distribute it in such a
21 * fashion that it might be confused with the original M.I.T. software.
22 * M.I.T. makes no representations about the suitability of
23 * this software for any purpose. It is provided "as is" without express
24 * or implied warranty.
33 struct krb5int_fast_request_state {
34 krb5_kdc_req fast_outer_request;
35 krb5_keyblock *armor_key; /*non-null means fast is in use*/
36 krb5_fast_armor *armor;
37 krb5_ui_4 fast_state_flags;
38 krb5_ui_4 fast_options;
42 #define KRB5INT_FAST_DO_FAST (1l<<0) /* Perform FAST */
43 #define KRB5INT_FAST_ARMOR_AVAIL (1l<<1)
46 krb5int_fast_prep_req_body(krb5_context context,
47 struct krb5int_fast_request_state *state,
48 krb5_kdc_req *request,
49 krb5_data **encoded_req_body);
51 typedef krb5_error_code (*kdc_req_encoder_proc)(const krb5_kdc_req *,
55 krb5int_fast_prep_req(krb5_context context,
56 struct krb5int_fast_request_state *state,
57 krb5_kdc_req *request,
58 const krb5_data *to_be_checksummed,
59 kdc_req_encoder_proc encoder,
60 krb5_data **encoded_request);
63 krb5int_fast_process_error(krb5_context context,
64 struct krb5int_fast_request_state *state,
65 krb5_error **err_replyptr,
66 krb5_pa_data ***out_padata,
70 krb5int_fast_process_response(krb5_context context,
71 struct krb5int_fast_request_state *state,
73 krb5_keyblock **strengthen_key);
76 krb5int_fast_make_state(krb5_context context,
77 struct krb5int_fast_request_state **state);
80 krb5int_fast_free_state(krb5_context context,
81 struct krb5int_fast_request_state *state);
84 krb5int_fast_as_armor(krb5_context context,
85 struct krb5int_fast_request_state *state,
86 krb5_gic_opt_ext *opte, krb5_kdc_req *request);
89 krb5int_fast_reply_key(krb5_context context,
90 krb5_keyblock *strengthen_key,
91 krb5_keyblock *existing_key, krb5_keyblock *output_key);
95 krb5int_fast_verify_nego(krb5_context context,
96 struct krb5int_fast_request_state *state,
97 krb5_kdc_rep *rep, krb5_data *request,
98 krb5_keyblock *decrypting_key,
99 krb5_boolean *fast_avail);
102 krb5int_upgrade_to_fast_p(krb5_context context,
103 struct krb5int_fast_request_state *state,
104 krb5_pa_data **padata);