More KRB5_DEPRECATED fixes
This commit is contained in:
		 Asanka Herath
					Asanka Herath
				
			
				
					committed by
					
						 Love Hornquist Astrand
						Love Hornquist Astrand
					
				
			
			
				
	
			
			
			 Love Hornquist Astrand
						Love Hornquist Astrand
					
				
			
						parent
						
							c2f634d9ad
						
					
				
				
					commit
					c53686e69b
				
			| @@ -5030,12 +5030,12 @@ krb5_crypto_fx_cf2(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_keytype_to_enctypes (krb5_context context, | ||||
| 			  krb5_keytype keytype, | ||||
| 			  unsigned *len, | ||||
| 			  krb5_enctype **val) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     int i; | ||||
|     unsigned n = 0; | ||||
| @@ -5077,11 +5077,11 @@ krb5_keytype_to_enctypes (krb5_context context, | ||||
|  */ | ||||
|  | ||||
| /* if two enctypes have compatible keys */ | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL | ||||
| krb5_enctypes_compatible_keys(krb5_context context, | ||||
| 			      krb5_enctype etype1, | ||||
| 			      krb5_enctype etype2) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     struct encryption_type *e1 = _find_enctype(etype1); | ||||
|     struct encryption_type *e2 = _find_enctype(etype2); | ||||
|   | ||||
| @@ -51,9 +51,9 @@ | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION void KRB5_LIB_CALL | ||||
| krb5_free_data_contents(krb5_context context, krb5_data *data) | ||||
|   KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_data_free(data); | ||||
| } | ||||
| @@ -64,12 +64,12 @@ krb5_free_data_contents(krb5_context context, krb5_data *data) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_keytype_to_enctypes_default (krb5_context context, | ||||
| 				  krb5_keytype keytype, | ||||
| 				  unsigned *len, | ||||
| 				  krb5_enctype **val) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     unsigned int i, n; | ||||
|     krb5_enctype *ret; | ||||
| @@ -114,11 +114,11 @@ static int num_keys = sizeof(keys) / sizeof(keys[0]); | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_keytype_to_string(krb5_context context, | ||||
| 		       krb5_keytype keytype, | ||||
| 		       char **string) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     const char *name; | ||||
|     int i; | ||||
| @@ -151,11 +151,11 @@ krb5_keytype_to_string(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_string_to_keytype(krb5_context context, | ||||
| 		       const char *string, | ||||
| 		       krb5_keytype *keytype) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     char *end; | ||||
|     int i; | ||||
| @@ -184,13 +184,13 @@ krb5_string_to_keytype(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code | ||||
| krb5_password_key_proc (krb5_context context, | ||||
| 			krb5_enctype type, | ||||
| 			krb5_salt salt, | ||||
| 			krb5_const_pointer keyseed, | ||||
| 			krb5_keyblock **key) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_error_code ret; | ||||
|     const char *password = (const char *)keyseed; | ||||
| @@ -220,6 +220,7 @@ krb5_password_key_proc (krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_in_tkt_with_password (krb5_context context, | ||||
| 			       krb5_flags options, | ||||
| @@ -230,7 +231,6 @@ krb5_get_in_tkt_with_password (krb5_context context, | ||||
| 			       krb5_ccache ccache, | ||||
| 			       krb5_creds *creds, | ||||
| 			       krb5_kdc_rep *ret_as_reply) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|      return krb5_get_in_tkt (context, | ||||
| 			     options, | ||||
| @@ -262,6 +262,7 @@ krb5_skey_key_proc (krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_in_tkt_with_skey (krb5_context context, | ||||
| 			   krb5_flags options, | ||||
| @@ -272,7 +273,6 @@ krb5_get_in_tkt_with_skey (krb5_context context, | ||||
| 			   krb5_ccache ccache, | ||||
| 			   krb5_creds *creds, | ||||
| 			   krb5_kdc_rep *ret_as_reply) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     if(key == NULL) | ||||
| 	return krb5_get_in_tkt_with_keytab (context, | ||||
| @@ -305,13 +305,13 @@ krb5_get_in_tkt_with_skey (krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code | ||||
| krb5_keytab_key_proc (krb5_context context, | ||||
| 		      krb5_enctype enctype, | ||||
| 		      krb5_salt salt, | ||||
| 		      krb5_const_pointer keyseed, | ||||
| 		      krb5_keyblock **key) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_keytab_key_proc_args *args  = rk_UNCONST(keyseed); | ||||
|     krb5_keytab keytab = args->keytab; | ||||
| @@ -345,6 +345,7 @@ krb5_keytab_key_proc (krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_in_tkt_with_keytab (krb5_context context, | ||||
| 			     krb5_flags options, | ||||
| @@ -355,7 +356,6 @@ krb5_get_in_tkt_with_keytab (krb5_context context, | ||||
| 			     krb5_ccache ccache, | ||||
| 			     krb5_creds *creds, | ||||
| 			     krb5_kdc_rep *ret_as_reply) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_keytab_key_proc_args a; | ||||
|  | ||||
| @@ -376,6 +376,8 @@ krb5_get_in_tkt_with_keytab (krb5_context context, | ||||
| 			    ret_as_reply); | ||||
| } | ||||
|  | ||||
| #ifdef KRB4 | ||||
|  | ||||
| static krb5_boolean | ||||
| convert_func(krb5_context conxtext, void *funcctx, krb5_principal principal) | ||||
| { | ||||
| @@ -389,6 +391,7 @@ convert_func(krb5_context conxtext, void *funcctx, krb5_principal principal) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_425_conv_principal_ext(krb5_context context, | ||||
| 			    const char *name, | ||||
| @@ -397,7 +400,6 @@ krb5_425_conv_principal_ext(krb5_context context, | ||||
| 			    krb5_boolean (*func)(krb5_context, krb5_principal), | ||||
| 			    krb5_boolean resolve, | ||||
| 			    krb5_principal *principal) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     return krb5_425_conv_principal_ext2(context, | ||||
| 					name, | ||||
| @@ -415,13 +417,13 @@ krb5_425_conv_principal_ext(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_425_conv_principal(krb5_context context, | ||||
| 			const char *name, | ||||
| 			const char *instance, | ||||
| 			const char *realm, | ||||
| 			krb5_principal *princ) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_boolean resolve = krb5_config_get_bool(context, | ||||
| 						NULL, | ||||
| @@ -433,6 +435,8 @@ krb5_425_conv_principal(krb5_context context, | ||||
| 				       NULL, resolve, princ); | ||||
| } | ||||
|  | ||||
| #endif | ||||
|  | ||||
| /** | ||||
|  * Generate a new ccache of type `ops' in `id'. | ||||
|  * | ||||
| @@ -444,11 +448,11 @@ krb5_425_conv_principal(krb5_context context, | ||||
|  */ | ||||
|  | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_cc_gen_new(krb5_context context, | ||||
| 		const krb5_cc_ops *ops, | ||||
| 		krb5_ccache *id) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     return krb5_cc_new_unique(context, ops->prefix, NULL, id); | ||||
| } | ||||
| @@ -459,10 +463,10 @@ krb5_cc_gen_new(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL | ||||
| krb5_princ_realm(krb5_context context, | ||||
| 		 krb5_principal principal) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     return &principal->realm; | ||||
| } | ||||
| @@ -474,11 +478,11 @@ krb5_princ_realm(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION void KRB5_LIB_CALL | ||||
| krb5_princ_set_realm(krb5_context context, | ||||
| 		     krb5_principal principal, | ||||
| 		     krb5_realm *realm) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     principal->realm = *realm; | ||||
| } | ||||
| @@ -490,9 +494,9 @@ krb5_princ_set_realm(krb5_context context, | ||||
|  */ | ||||
|  | ||||
| /* keep this for compatibility with older code */ | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_free_creds_contents (krb5_context context, krb5_creds *c) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     return krb5_free_cred_contents (context, c); | ||||
| } | ||||
| @@ -508,9 +512,9 @@ krb5_free_creds_contents (krb5_context context, krb5_creds *c) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION void KRB5_LIB_CALL | ||||
| krb5_free_error_string(krb5_context context, char *str) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_free_error_message(context, str); | ||||
| } | ||||
| @@ -528,9 +532,10 @@ krb5_free_error_string(krb5_context context, char *str) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_set_error_string(krb5_context context, const char *fmt, ...) | ||||
|     __attribute__((format (printf, 2, 3))) KRB5_DEPRECATED | ||||
|     __attribute__((format (printf, 2, 3))) | ||||
| { | ||||
|     va_list ap; | ||||
|  | ||||
| @@ -554,9 +559,10 @@ krb5_set_error_string(krb5_context context, const char *fmt, ...) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_vset_error_string(krb5_context context, const char *fmt, va_list args) | ||||
|     __attribute__ ((format (printf, 2, 0))) KRB5_DEPRECATED | ||||
|     __attribute__ ((format (printf, 2, 0))) | ||||
| { | ||||
|     krb5_vset_error_message(context, 0, fmt, args); | ||||
|     return 0; | ||||
| @@ -572,9 +578,9 @@ krb5_vset_error_string(krb5_context context, const char *fmt, va_list args) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION void KRB5_LIB_CALL | ||||
| krb5_clear_error_string(krb5_context context) | ||||
|      KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_clear_error_message(context); | ||||
| } | ||||
| @@ -585,13 +591,14 @@ krb5_clear_error_string(krb5_context context) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_cred_from_kdc_opt(krb5_context context, | ||||
| 			   krb5_ccache ccache, | ||||
| 			   krb5_creds *in_creds, | ||||
| 			   krb5_creds **out_creds, | ||||
| 			   krb5_creds ***ret_tgts, | ||||
| 			   krb5_flags flags) KRB5_DEPRECATED | ||||
| 			   krb5_flags flags) | ||||
| { | ||||
|     krb5_kdc_flags f; | ||||
|     f.i = flags; | ||||
| @@ -606,12 +613,13 @@ krb5_get_cred_from_kdc_opt(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_cred_from_kdc(krb5_context context, | ||||
| 		       krb5_ccache ccache, | ||||
| 		       krb5_creds *in_creds, | ||||
| 		       krb5_creds **out_creds, | ||||
| 		       krb5_creds ***ret_tgts) KRB5_DEPRECATED | ||||
| 		       krb5_creds ***ret_tgts) | ||||
| { | ||||
|     return krb5_get_cred_from_kdc_opt(context, ccache, | ||||
| 				      in_creds, out_creds, ret_tgts, 0); | ||||
|   | ||||
| @@ -361,6 +361,7 @@ set_ptypes(krb5_context context, | ||||
|     return(1); | ||||
| } | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_in_cred(krb5_context context, | ||||
| 		 krb5_flags options, | ||||
| @@ -374,7 +375,6 @@ krb5_get_in_cred(krb5_context context, | ||||
| 		 krb5_const_pointer decryptarg, | ||||
| 		 krb5_creds *creds, | ||||
| 		 krb5_kdc_rep *ret_as_reply) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_error_code ret; | ||||
|     AS_REQ a; | ||||
| @@ -526,6 +526,7 @@ out: | ||||
|     return ret; | ||||
| } | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_in_tkt(krb5_context context, | ||||
| 		krb5_flags options, | ||||
| @@ -539,7 +540,6 @@ krb5_get_in_tkt(krb5_context context, | ||||
| 		krb5_creds *creds, | ||||
| 		krb5_ccache ccache, | ||||
| 		krb5_kdc_rep *ret_as_reply) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     krb5_error_code ret; | ||||
|  | ||||
|   | ||||
| @@ -402,9 +402,9 @@ krb5_get_init_creds_opt_set_process_last_req(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION void KRB5_LIB_CALL | ||||
| krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     memset (opt, 0, sizeof(*opt)); | ||||
| } | ||||
| @@ -416,11 +416,11 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt) | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_get_init_creds_opt_get_error(krb5_context context, | ||||
| 				  krb5_get_init_creds_opt *opt, | ||||
| 				  KRB_ERROR **error) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     *error = calloc(1, sizeof(**error)); | ||||
|     if (*error == NULL) { | ||||
|   | ||||
| @@ -317,12 +317,12 @@ krb5_c_encrypt_length(krb5_context context, | ||||
|  * @ingroup krb5_deprecated | ||||
|  */ | ||||
|  | ||||
| KRB5_DEPRECATED | ||||
| KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL | ||||
| krb5_c_enctype_compare(krb5_context context, | ||||
| 		       krb5_enctype e1, | ||||
| 		       krb5_enctype e2, | ||||
| 		       krb5_boolean *similar) | ||||
|     KRB5_DEPRECATED | ||||
| { | ||||
|     *similar = (e1 == e2); | ||||
|     return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user