diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-11-21 21:14:39 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-11-21 21:14:39 +0000 |
commit | 3fe47057c7535f4603825a01fb84262b7bfa4c55 (patch) | |
tree | be7bef0585d0635d1683cdbe215f8d09824b7bba /src/include/krb5/preauth_plugin.h | |
parent | f7805327f31940d27e78aecc339108c138f0bec4 (diff) | |
download | krb5-3fe47057c7535f4603825a01fb84262b7bfa4c55.tar.gz krb5-3fe47057c7535f4603825a01fb84262b7bfa4c55.tar.xz krb5-3fe47057c7535f4603825a01fb84262b7bfa4c55.zip |
Clean up client-side preauth error data handling
Change the clpreauth tryagain method to accept a list of pa-data,
taken either from the FAST response or from decoding the e_data as
either pa-data or typed-data. Also change the in_padata argument to
contain just the type of the request padata rather than the whole
element, since modules generally shouldn't care about the contents of
their request padata (or they can remember it).
In krb5int_fast_process_error, no longer re-encode FAST pa-data as
typed-data for the inner error e_data, but decode traditional error
e_data for all error types, and try both pa-data and typed-data
encoding.
In PKINIT, try all elements of the new pa-data list, since it may
contain FAST elements as well as the actual PKINIT array. (Fixes an
outstanding bug in FAST PKINIT.)
ticket: 7023
target_version: 1.10
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25483 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/krb5/preauth_plugin.h')
-rw-r--r-- | src/include/krb5/preauth_plugin.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/krb5/preauth_plugin.h b/src/include/krb5/preauth_plugin.h index a0b15a810e..f732b947d2 100644 --- a/src/include/krb5/preauth_plugin.h +++ b/src/include/krb5/preauth_plugin.h @@ -242,10 +242,14 @@ typedef krb5_error_code krb5_pa_data ***pa_data_out); /* - * Optional: Attempt to use e-data in the error response to try to recover from - * the given error. If this function is provided, and it stores data in - * pa_data_out which is different data from the contents of pa_data_in, then - * the client library will retransmit the request. + * Optional: Attempt to use error and error_padata to try to recover from the + * given error. To work with both FAST and non-FAST errors, an implementation + * should generally consult error_padata rather than decoding error->e_data. + * For non-FAST errors, it contains the e_data decoded as either pa-data or + * typed-data. + * + * If this function is provided, and it returns 0 and stores data in + * pa_data_out, then the client library will retransmit the request. */ typedef krb5_error_code (*krb5_clpreauth_tryagain_fn)(krb5_context context, @@ -257,8 +261,9 @@ typedef krb5_error_code krb5_kdc_req *request, krb5_data *encoded_request_body, krb5_data *encoded_previous_request, - krb5_pa_data *pa_data_in, + krb5_preauthtype pa_type, krb5_error *error, + krb5_pa_data **error_padata, krb5_prompter_fct prompter, void *prompter_data, krb5_pa_data ***pa_data_out); |