+2003-01-06 Sam Hartman <hartmans@mit.edu>
+
+ * krb5.hin: Add support for setting a callback to generate the
+ data checksummed by mk_req
+
2003-01-03 Ezra Peisach <epeisach@bu.edu>
* fake-addrinfo.h (freeaddrinfo): Do not free a NULL pointer.
/*
* include/krb5.h
*
- * Copyright 1989,1990,1995,2001 by the Massachusetts Institute of Technology.
+ * Copyright 1989,1990,1995,2001, 2003 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
#define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR 0x00000004
#define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR 0x00000008
+/* type of function used as a callback to generate checksum data for
+ * mk_req*/
+
+typedef krb5_error_code KRB5_CALLCONV
+(* krb5_mk_req_checksum_func) (krb5_context, krb5_auth_context , void *,
+ krb5_data **);
+
/*
* end "safepriv.h"
*/
krb5_auth_context,
krb5_int32 *);
+krb5_error_code KRB5_CALLCONV
+krb5_auth_con_set_checksum_func (krb5_context, krb5_auth_context,
+ krb5_mk_req_checksum_func, void *);
+
+krb5_error_code KRB5_CALLCONV
+krb5_auth_con_get_checksum_func( krb5_context, krb5_auth_context,
+ krb5_mk_req_checksum_func *, void **);
+
krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs
(krb5_context,
krb5_auth_context,
+2003-01-06 Sam Hartman <hartmans@mit.edu>
+
+ * krb5_32.def: Export krb5_auth_con_*_checksum_func
+
2002-12-02 Tom Yu <tlyu@mit.edu>
* win_glue.c: Put kadm_err.et references back in.
+2003-01-06 Sam Hartman <hartmans@mit.edu>
+
+ * mk_req_ext.c (krb5_mk_req_extended): Inf no in_data is provided
+ but krb5_auth_con_set_checksum_func has been called, then use that
+ callback to generate the in_data.
+
+ * auth_con.c (krb5_auth_con_init): Initialize checksum_func fields
+ (krb5_auth_con_set_checksum_func): new function-- set the mk_req
+ checksum function
+ (krb5_auth_con_get_checksum_func): return the same
+
+ * auth_con.h: Add checksum_func and checksum_func_data
+
2002-12-23 Ezra Peisach <epeisach@bu.edu>
* t_kerb.c: Include string.h for strcmp prototype.
(*auth_context)->req_cksumtype = context->default_ap_req_sumtype;
(*auth_context)->safe_cksumtype = context->default_safe_sumtype;
+ (*auth_context) -> checksum_func = NULL;
+ (*auth_context)->checksum_func_data = NULL;
(*auth_context)->magic = KV5M_AUTH_CONTEXT;
return 0;
}
return(0);
}
+
+krb5_error_code KRB5_CALLCONV
+krb5_auth_con_set_checksum_func( krb5_context context,
+ krb5_auth_context auth_context,
+ krb5_mk_req_checksum_func func,
+ void *data)
+{
+ auth_context->checksum_func = func;
+ auth_context->checksum_func_data = data;
+ return 0;
+}
+
+krb5_error_code KRB5_CALLCONV
+krb5_auth_con_get_checksum_func( krb5_context context,
+ krb5_auth_context auth_context,
+ krb5_mk_req_checksum_func *func,
+ void **data)
+{
+ *func = auth_context->checksum_func;
+ *data = auth_context->checksum_func_data;
+ return 0;
+}
krb5_pointer i_vector; /* mk_priv, rd_priv only */
krb5_rcache rcache;
krb5_enctype * permitted_etypes; /* rd_req */
+ krb5_mk_req_checksum_func checksum_func;
+ void *checksum_func_data;
};
goto cleanup;
}
+ if (!in_data &&(*auth_context)->checksum_func) {
+
if (in_data) {
+ retval = (*auth_context)->checksum_func( context,
+ *auth_context,
+ (*auth_context)->checksum_func_data,
+ &in_data);
+ if (retval)
+ goto cleanup_cksum;
+ }
+
if ((*auth_context)->req_cksumtype == 0x8003) {
/* XXX Special hack for GSSAPI */
checksum.checksum_type = 0x8003;
krb5_auth_con_getauthenticator
krb5_auth_con_set_req_cksumtype
krb5_auth_con_setrcache
+krb5_auth_con_set_checksum_func
+krb5_auth_con_get_checksum_func
;
krb5_cc_default
krb5_cc_default_name