From: Greg Hudson Date: Sun, 1 Nov 2009 02:47:58 +0000 (+0000) Subject: Move the implementations of four deprecated crypto functions to X-Git-Tag: krb5-1.8-alpha1~227 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf7386cd665c7988e90d5df2a8a5b36839de481b;p=krb5.git Move the implementations of four deprecated crypto functions to old_api_glue.c. Move the prototypes of seven deprecated crypto functions to old_api_glue.c instead of k5-int.h, since we don't use those functions internally. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23112 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-int.h b/src/include/k5-int.h index c583efd1f..2bdcbf6be 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -2574,29 +2574,6 @@ krb5_error_code KRB5_CALLCONV krb5int_clean_hostname char *, size_t); -/* Use the above four instead. */ -krb5_boolean KRB5_CALLCONV valid_enctype - (krb5_enctype ktype); -krb5_boolean KRB5_CALLCONV valid_cksumtype - (krb5_cksumtype ctype); -krb5_boolean KRB5_CALLCONV is_coll_proof_cksum - (krb5_cksumtype ctype); -krb5_boolean KRB5_CALLCONV is_keyed_cksum - (krb5_cksumtype ctype); - -krb5_error_code KRB5_CALLCONV krb5_random_confounder - (size_t, krb5_pointer); - -krb5_error_code krb5_encrypt_data - (krb5_context context, krb5_keyblock *key, - krb5_pointer ivec, krb5_data *data, - krb5_enc_data *enc_data); - -krb5_error_code krb5_decrypt_data - (krb5_context context, krb5_keyblock *key, - krb5_pointer ivec, krb5_enc_data *data, - krb5_data *enc_data); - krb5_error_code krb5int_aes_encrypt(krb5_key key, const krb5_data *ivec, const krb5_data *input, krb5_data *output); diff --git a/src/lib/crypto/krb/coll_proof_cksum.c b/src/lib/crypto/krb/coll_proof_cksum.c index e5d7ed13c..a6226ba84 100644 --- a/src/lib/crypto/krb/coll_proof_cksum.c +++ b/src/lib/crypto/krb/coll_proof_cksum.c @@ -42,9 +42,3 @@ krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype) old code would have done */ return FALSE; } - -krb5_boolean KRB5_CALLCONV -is_coll_proof_cksum(krb5_cksumtype ctype) -{ - return krb5_c_is_coll_proof_cksum(ctype); -} diff --git a/src/lib/crypto/krb/keyed_cksum.c b/src/lib/crypto/krb/keyed_cksum.c index 97292769b..ac49ef6d0 100644 --- a/src/lib/crypto/krb/keyed_cksum.c +++ b/src/lib/crypto/krb/keyed_cksum.c @@ -44,9 +44,3 @@ krb5_c_is_keyed_cksum(krb5_cksumtype ctype) /* Invalid ctype. This is misleading, but better than dumping core. */ return FALSE; } - -krb5_boolean KRB5_CALLCONV -is_keyed_cksum(krb5_cksumtype ctype) -{ - return krb5_c_is_keyed_cksum(ctype); -} diff --git a/src/lib/crypto/krb/old_api_glue.c b/src/lib/crypto/krb/old_api_glue.c index 73f4fd7b2..c4ee596a5 100644 --- a/src/lib/crypto/krb/old_api_glue.c +++ b/src/lib/crypto/krb/old_api_glue.c @@ -26,6 +26,24 @@ #include "k5-int.h" +/* + * The following functions were removed from the API in krb5 1.3 but + * still need to be exported for ABI compatibility. The other + * functions defined in this file are still in the API (and thus + * prototyped in krb5.hin) but are deprecated. + */ +krb5_boolean KRB5_CALLCONV valid_enctype(krb5_enctype ktype); +krb5_boolean KRB5_CALLCONV valid_cksumtype(krb5_cksumtype ctype); +krb5_boolean KRB5_CALLCONV is_coll_proof_cksum(krb5_cksumtype ctype); +krb5_boolean KRB5_CALLCONV is_keyed_cksum(krb5_cksumtype ctype); +krb5_error_code KRB5_CALLCONV krb5_random_confounder(size_t, krb5_pointer); +krb5_error_code krb5_encrypt_data(krb5_context context, krb5_keyblock *key, + krb5_pointer ivec, krb5_data *data, + krb5_enc_data *enc_data); +krb5_error_code krb5_decrypt_data(krb5_context context, krb5_keyblock *key, + krb5_pointer ivec, krb5_enc_data *data, + krb5_data *enc_data); + krb5_error_code KRB5_CALLCONV krb5_encrypt(krb5_context context, krb5_const_pointer inptr, krb5_pointer outptr, size_t size, krb5_encrypt_block *eblock, @@ -341,3 +359,27 @@ krb5_error_code krb5_decrypt_data(krb5_context context, krb5_keyblock *key, return 0; } + +krb5_boolean KRB5_CALLCONV +valid_cksumtype(krb5_cksumtype ctype) +{ + return krb5_c_valid_cksumtype(ctype); +} + +krb5_boolean KRB5_CALLCONV +is_keyed_cksum(krb5_cksumtype ctype) +{ + return krb5_c_is_keyed_cksum(ctype); +} + +krb5_boolean KRB5_CALLCONV +is_coll_proof_cksum(krb5_cksumtype ctype) +{ + return krb5_c_is_coll_proof_cksum(ctype); +} + +krb5_boolean KRB5_CALLCONV +valid_enctype(krb5_enctype etype) +{ + return krb5_c_valid_enctype(etype); +} diff --git a/src/lib/crypto/krb/valid_cksumtype.c b/src/lib/crypto/krb/valid_cksumtype.c index 69cc18667..2b1e7228c 100644 --- a/src/lib/crypto/krb/valid_cksumtype.c +++ b/src/lib/crypto/krb/valid_cksumtype.c @@ -39,9 +39,3 @@ krb5_c_valid_cksumtype(krb5_cksumtype ctype) return FALSE; } - -krb5_boolean KRB5_CALLCONV -valid_cksumtype(krb5_cksumtype ctype) -{ - return krb5_c_valid_cksumtype(ctype); -} diff --git a/src/lib/crypto/krb/valid_enctype.c b/src/lib/crypto/krb/valid_enctype.c index a6445111e..e6fcb2eaa 100644 --- a/src/lib/crypto/krb/valid_enctype.c +++ b/src/lib/crypto/krb/valid_enctype.c @@ -33,12 +33,6 @@ krb5_c_valid_enctype(krb5_enctype etype) return (find_enctype(etype) != NULL); } -krb5_boolean KRB5_CALLCONV -valid_enctype(krb5_enctype etype) -{ - return krb5_c_valid_enctype(etype); -} - krb5_boolean KRB5_CALLCONV krb5int_c_weak_enctype(krb5_enctype etype) {