From 648b610ff570e510fbcde587bb3eee3eefb6477b Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 7 Jan 2012 17:26:13 +0000 Subject: [PATCH] Remove some unneeded accessor fields git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25620 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-int.h | 30 +------------------- src/lib/krb5/asn.1/asn1_k_encode.c | 1 - src/lib/krb5/os/accessor.c | 7 ----- src/plugins/preauth/pkinit/pkinit_accessor.c | 9 ------ src/plugins/preauth/pkinit/pkinit_accessor.h | 4 --- src/tests/asn.1/krb5_encode_test.c | 4 +-- 6 files changed, 3 insertions(+), 52 deletions(-) diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 0e9476000..7a196c69b 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1547,9 +1547,6 @@ encode_krb5_error(const krb5_error *rep, krb5_data **code); krb5_error_code encode_krb5_authdata(krb5_authdata *const *rep, krb5_data **code); -krb5_error_code -encode_krb5_authdata_elt(const krb5_authdata *rep, krb5_data **code); - krb5_error_code encode_krb5_padata_sequence(krb5_pa_data *const *rep, krb5_data **code); @@ -1959,19 +1956,9 @@ void krb5int_free_srv_dns_data(struct srv_dns_entry *); /* To keep happy libraries which are (for now) accessing internal stuff */ /* Make sure to increment by one when changing the struct */ -#define KRB5INT_ACCESS_STRUCT_VERSION 19 +#define KRB5INT_ACCESS_STRUCT_VERSION 20 -#ifndef ANAME_SZ -struct ktext; /* from krb.h, for krb524 support */ -#endif typedef struct _krb5int_access { - /* crypto stuff */ - krb5_error_code (*arcfour_gsscrypt)(const krb5_keyblock *keyblock, - krb5_keyusage usage, - const krb5_data *kd_data, - krb5_crypto_iov *data, - size_t num_data); - krb5_error_code (*auth_con_get_subkey_enctype)(krb5_context, krb5_auth_context, krb5_enctype *); @@ -2085,9 +2072,6 @@ typedef struct _krb5int_access { krb5_external_principal_identifier ***); - krb5_error_code - (*decode_krb5_as_req)(const krb5_data *output, krb5_kdc_req **rep); - krb5_error_code (*encode_krb5_kdc_req_body)(const krb5_kdc_req *rep, krb5_data **code); @@ -2095,18 +2079,6 @@ typedef struct _krb5int_access { (KRB5_CALLCONV *free_kdc_req)(krb5_context, krb5_kdc_req * ); void (*set_prompt_types)(krb5_context, krb5_prompt_type *); - - krb5_error_code - (*encode_krb5_authdata_elt)(const krb5_authdata *rep, krb5_data **code); - - /* Exported for testing only! */ - krb5_error_code - (*encode_krb5_sam_response_2)(const krb5_sam_response_2 *rep, - krb5_data **code); - krb5_error_code - (*encode_krb5_enc_sam_response_enc_2)(const - krb5_enc_sam_response_enc_2 *rep, - krb5_data **code); } krb5int_access; #define KRB5INT_ACCESS_VERSION \ diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 4aa4da72b..a3ed7835f 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -1253,7 +1253,6 @@ MAKE_FULL_ENCODER(encode_krb5_cred, krb5_cred); MAKE_FULL_ENCODER(encode_krb5_enc_cred_part, enc_cred_part); MAKE_FULL_ENCODER(encode_krb5_error, krb5_error); MAKE_FULL_ENCODER(encode_krb5_authdata, auth_data); -MAKE_FULL_ENCODER(encode_krb5_authdata_elt, authdata_elt); MAKE_FULL_ENCODER(encode_krb5_etype_info, etype_info); MAKE_FULL_ENCODER(encode_krb5_etype_info2, etype_info2); MAKE_FULL_ENCODER(encode_krb5_enc_data, encrypted_data); diff --git a/src/lib/krb5/os/accessor.c b/src/lib/krb5/os/accessor.c index 52df8bccf..8f9146312 100644 --- a/src/lib/krb5/os/accessor.c +++ b/src/lib/krb5/os/accessor.c @@ -50,12 +50,10 @@ krb5int_accessor(krb5int_access *internals, krb5_int32 version) #define S(FIELD, VAL) internals_temp.FIELD = VAL krb5int_access internals_temp; #endif - S (arcfour_gsscrypt, krb5int_arcfour_gsscrypt), S (auth_con_get_subkey_enctype, krb5_auth_con_get_subkey_enctype), S (clean_hostname, krb5int_clean_hostname), - S (mandatory_cksumtype, krb5int_c_mandatory_cksumtype), #ifndef LEAN_CLIENT #define SC(FIELD, VAL) S(FIELD, VAL) #else /* disable */ @@ -102,16 +100,11 @@ krb5int_accessor(krb5int_access *internals, krb5_int32 version) SC (decode_krb5_reply_key_pack_draft9, decode_krb5_reply_key_pack_draft9), SC (decode_krb5_td_trusted_certifiers, decode_krb5_td_trusted_certifiers), SC (decode_krb5_td_dh_parameters, decode_krb5_td_dh_parameters), - SC (decode_krb5_as_req, decode_krb5_as_req), SC (encode_krb5_kdc_req_body, encode_krb5_kdc_req_body), SC (free_kdc_req, krb5_free_kdc_req), SC (set_prompt_types, krb5int_set_prompt_types), - SC (encode_krb5_authdata_elt, encode_krb5_authdata_elt), #undef SC - S (encode_krb5_sam_response_2, encode_krb5_sam_response_2), - S (encode_krb5_enc_sam_response_enc_2, encode_krb5_enc_sam_response_enc_2), - #if DESIGNATED_INITIALIZERS }; #else diff --git a/src/plugins/preauth/pkinit/pkinit_accessor.c b/src/plugins/preauth/pkinit/pkinit_accessor.c index cf8a2f530..2fa702fe1 100644 --- a/src/plugins/preauth/pkinit/pkinit_accessor.c +++ b/src/plugins/preauth/pkinit/pkinit_accessor.c @@ -70,9 +70,6 @@ krb5_error_code (const krb5_data *, krb5_external_principal_identifier ***); -krb5_error_code -(*k5int_decode_krb5_as_req)(const krb5_data *output, krb5_kdc_req **rep); - krb5_error_code (*k5int_encode_krb5_kdc_req_body)(const krb5_kdc_req *rep, krb5_data **code); @@ -82,10 +79,6 @@ void KRB5_CALLCONV void (*k5int_set_prompt_types)(krb5_context, krb5_prompt_type *); -krb5_error_code -(*k5int_encode_krb5_authdata_elt)(const krb5_authdata *rep, krb5_data **code); - - /* * Grab internal function pointers from the krb5int_accessor @@ -118,10 +111,8 @@ pkinit_accessor_init(void) /* special cases... */ k5int_decode_krb5_principal_name = k5int.decode_krb5_principal_name; - k5int_decode_krb5_as_req = k5int.decode_krb5_as_req; k5int_encode_krb5_kdc_req_body = k5int.encode_krb5_kdc_req_body; k5int_krb5_free_kdc_req = k5int.free_kdc_req; k5int_set_prompt_types = k5int.set_prompt_types; - k5int_encode_krb5_authdata_elt = k5int.encode_krb5_authdata_elt; return 0; } diff --git a/src/plugins/preauth/pkinit/pkinit_accessor.h b/src/plugins/preauth/pkinit/pkinit_accessor.h index df40ab9eb..a5e45bf3e 100644 --- a/src/plugins/preauth/pkinit/pkinit_accessor.h +++ b/src/plugins/preauth/pkinit/pkinit_accessor.h @@ -68,15 +68,11 @@ extern krb5_error_code (*k5int_encode_krb5_td_trusted_certifiers) extern krb5_error_code (*k5int_decode_krb5_td_trusted_certifiers) (const krb5_data *, krb5_external_principal_identifier ***); -extern krb5_error_code (*k5int_decode_krb5_as_req) - (const krb5_data *output, krb5_kdc_req **rep); extern krb5_error_code (*k5int_encode_krb5_kdc_req_body) (const krb5_kdc_req *rep, krb5_data **code); extern void KRB5_CALLCONV (*k5int_krb5_free_kdc_req) (krb5_context, krb5_kdc_req * ); extern void (*k5int_set_prompt_types) (krb5_context, krb5_prompt_type *); -extern krb5_error_code (*k5int_encode_krb5_authdata_elt) - (const krb5_authdata *rep, krb5_data **code); #endif /* _PKINIT_ACCESSOR_H */ diff --git a/src/tests/asn.1/krb5_encode_test.c b/src/tests/asn.1/krb5_encode_test.c index b025ec4d0..9e7eed1bc 100644 --- a/src/tests/asn.1/krb5_encode_test.c +++ b/src/tests/asn.1/krb5_encode_test.c @@ -625,7 +625,7 @@ main(argc, argv) krb5_sam_response_2 sam_ch2; ktest_make_sample_sam_response_2(&sam_ch2); encode_run(sam_ch2,krb5_sam_response_2,"sam_response_2","", - acc.encode_krb5_sam_response_2); + encode_krb5_sam_response_2); ktest_empty_sam_response_2(&sam_ch2); } /****************************************************************/ @@ -635,7 +635,7 @@ main(argc, argv) ktest_make_sample_enc_sam_response_enc_2(&sam_ch2); encode_run(sam_ch2,krb5_enc_sam_response_enc_2, "enc_sam_response_enc_2","", - acc.encode_krb5_enc_sam_response_enc_2); + encode_krb5_enc_sam_response_enc_2); ktest_empty_enc_sam_response_enc_2(&sam_ch2); } /****************************************************************/ -- 2.26.2