From: Ezra Peisach Date: Mon, 14 May 2001 18:19:55 +0000 (+0000) Subject: * wrap_size_limit.c (krb5_gss_wrap_size_limit): Get rid of unused X-Git-Tag: krb5-1.3-alpha1~1510 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e7d77d6dc4fb21b4fc8246f8155f198343cf7af;p=krb5.git * wrap_size_limit.c (krb5_gss_wrap_size_limit): Get rid of unused variable. * util_ctxsetup.c (kg2_parse_token): Fix erroneous assignment in conditional. (code not used in current tree). * util_seed.c, util_seqnum.c, util_crypt.c, util_cksum.c: Cleanup up assignments in conditionals. * ser_sctx.c (kg_queue_internalize): Get rid of unused variable. * gssapiP_krb5.h: Renable prototype for krb5_gss_release_oid() as code is back (since 1996). * k5unseal.c (kg_unseal_v1): Declare internal function static. * init_sec_context.c (make_ap_req_v2): Comment out non-referenced function. * gssapi_krb5.c: Include k5-int.h for krb5_ser_* prototypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13241 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index e33f583b8..ec3c4cf49 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,26 @@ +2001-05-14 Ezra Peisach + + * wrap_size_limit.c (krb5_gss_wrap_size_limit): Get rid of unused + variable. + + * util_ctxsetup.c (kg2_parse_token): Fix erroneous assignment in + conditional. (code not used in current tree). + + * util_seed.c, util_seqnum.c, util_crypt.c, util_cksum.c: Cleanup + up assignments in conditionals. + + * ser_sctx.c (kg_queue_internalize): Get rid of unused variable. + + * gssapiP_krb5.h: Renable prototype for krb5_gss_release_oid() as + code is back (since 1996). + + * k5unseal.c (kg_unseal_v1): Declare internal function static. + + * init_sec_context.c (make_ap_req_v2): Comment out non-referenced + function. + + * gssapi_krb5.c: Include k5-int.h for krb5_ser_* prototypes. + 2001-04-24 Ezra Peisach * util_crypt.c (kg_make_confounder): Change variable random to diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index 5250112ff..e028aa68c 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -201,10 +201,8 @@ krb5_gss_accept_sec_context(minor_status, context_handle, krb5_ui_4 gss_flags = 0; int decode_req_message = 0; krb5_gss_ctx_id_rec *ctx = 0; - krb5_enctype enctype; krb5_timestamp now; gss_buffer_desc token; - int err; krb5_auth_context auth_context = NULL; krb5_ticket * ticket = NULL; int option_id; @@ -215,10 +213,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, krb5_data scratch; gss_cred_id_t cred_handle = NULL; krb5_gss_cred_id_t deleg_cred = NULL; - int token_length; - int nctypes; krb5_cksumtype *ctypes = 0; - struct kg2_option fwcred; if (GSS_ERROR(kg_get_context(minor_status, &context))) return(GSS_S_FAILURE); diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index ed0956999..2ac5f4d5e 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -576,12 +576,10 @@ PROTOTYPE( (OM_uint32 *, /* minor_status */ gss_ctx_id_t * /* context_handle */ )); -#if 0 OM_uint32 krb5_gss_release_oid PROTOTYPE( (OM_uint32 *, /* minor_status */ gss_OID * /* oid */ )); -#endif OM_uint32 krb5_gss_internal_release_oid PROTOTYPE( (OM_uint32 *, /* minor_status */ diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index e700bb888..7293c6dc0 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -50,6 +50,9 @@ * $Id$ */ + +/* For declaration of krb5_ser_context_init */ +#include "k5-int.h" #include "gssapiP_krb5.h" /** exported constants defined in gssapi_krb5{,_nx}.h **/ diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index ddd849c63..9c9d3fca3 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -161,6 +161,7 @@ cleanup: } +#if 0 static krb5_error_code make_ap_req_v2(context, ctx, cred, k_cred, chan_bindings, mech_type, token) krb5_context context; @@ -173,7 +174,9 @@ make_ap_req_v2(context, ctx, cred, k_cred, chan_bindings, mech_type, token) { int krb5_mech2_supported = 0; assert(krb5_mech2_supported); + return 0; } +#endif static krb5_error_code make_ap_req_v1(context, ctx, cred, k_cred, chan_bindings, mech_type, token) @@ -358,9 +361,8 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, krb5_gss_ctx_id_rec *ctx, *ctx_free; krb5_timestamp now; gss_buffer_desc token; - int i, j, err; + int i, err; int default_mech = 0; - krb5_ui_4 resp_flags; OM_uint32 major_status; if (GSS_ERROR(kg_get_context(minor_status, &context))) @@ -628,7 +630,7 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, } else { unsigned char *ptr; char *sptr; - krb5_data ap_rep, mic; + krb5_data ap_rep; krb5_ap_rep_enc_part *ap_rep_data; krb5_error *krb_error; diff --git a/src/lib/gssapi/krb5/k5unseal.c b/src/lib/gssapi/krb5/k5unseal.c index bc35e7021..af059609e 100644 --- a/src/lib/gssapi/krb5/k5unseal.c +++ b/src/lib/gssapi/krb5/k5unseal.c @@ -54,7 +54,7 @@ /* message_buffer is an input if SIGN, output if SEAL, and ignored if DEL_CTX conf_state is only valid if SEAL. */ -OM_uint32 +static OM_uint32 kg_unseal_v1(context, minor_status, ctx, ptr, bodysize, message_buffer, conf_state, qop_state, toktype) krb5_context context; @@ -217,7 +217,8 @@ kg_unseal_v1(context, minor_status, ctx, ptr, bodysize, message_buffer, abort (); } - if (code = krb5_c_checksum_length(context, md5cksum.checksum_type, &sumlen)) + code = krb5_c_checksum_length(context, md5cksum.checksum_type, &sumlen); + if (code) return(code); md5cksum.length = sumlen; diff --git a/src/lib/gssapi/krb5/ser_sctx.c b/src/lib/gssapi/krb5/ser_sctx.c index 1989a7d55..781e8ee14 100644 --- a/src/lib/gssapi/krb5/ser_sctx.c +++ b/src/lib/gssapi/krb5/ser_sctx.c @@ -155,7 +155,6 @@ kg_queue_internalize(kcontext, argp, buffer, lenremain) size_t *lenremain; { krb5_error_code kret; - gss_OID oid; krb5_int32 ibuf; krb5_octet *bp; size_t remain; diff --git a/src/lib/gssapi/krb5/util_cksum.c b/src/lib/gssapi/krb5/util_cksum.c index 77feade73..316f41bee 100644 --- a/src/lib/gssapi/krb5/util_cksum.c +++ b/src/lib/gssapi/krb5/util_cksum.c @@ -33,14 +33,15 @@ kg_checksum_channel_bindings(context, cb, cksum, bigend) krb5_checksum *cksum; int bigend; { - int len; + size_t len; char *buf, *ptr; size_t sumlen; krb5_data plaind; krb5_error_code code; /* initialize the the cksum */ - if (code = krb5_c_checksum_length(context, CKSUMTYPE_RSA_MD5, &sumlen)) + code = krb5_c_checksum_length(context, CKSUMTYPE_RSA_MD5, &sumlen); + if (code) return(code); cksum->checksum_type = CKSUMTYPE_RSA_MD5; @@ -82,8 +83,9 @@ kg_checksum_channel_bindings(context, cb, cksum, bigend) plaind.length = len; plaind.data = buf; - if (code = krb5_c_make_checksum(context, CKSUMTYPE_RSA_MD5, 0, 0, - &plaind, cksum)) { + code = krb5_c_make_checksum(context, CKSUMTYPE_RSA_MD5, 0, 0, + &plaind, cksum); + if (code) { xfree(buf); return(code); } diff --git a/src/lib/gssapi/krb5/util_crypt.c b/src/lib/gssapi/krb5/util_crypt.c index 8750f7b0c..5f150c0a1 100644 --- a/src/lib/gssapi/krb5/util_crypt.c +++ b/src/lib/gssapi/krb5/util_crypt.c @@ -60,7 +60,8 @@ kg_confounder_size(context, key) krb5_error_code code; size_t blocksize; - if (code = krb5_c_block_size(context, key->enctype, &blocksize)) + code = krb5_c_block_size(context, key->enctype, &blocksize); + if (code) return(-1); /* XXX */ return(blocksize); @@ -76,7 +77,8 @@ kg_make_confounder(context, key, buf) size_t blocksize; krb5_data lrandom; - if (code = krb5_c_block_size(context, key->enctype, &blocksize)) + code = krb5_c_block_size(context, key->enctype, &blocksize); + if (code) return(code); lrandom.length = blocksize; @@ -94,7 +96,8 @@ kg_encrypt_size(context, key, n) krb5_error_code code; size_t enclen; - if (code = krb5_c_encrypt_length(context, key->enctype, n, &enclen)) + code = krb5_c_encrypt_length(context, key->enctype, n, &enclen); + if (code) return(-1); /* XXX */ return(enclen); @@ -116,7 +119,8 @@ kg_encrypt(context, key, usage, iv, in, out, length) krb5_enc_data outputd; if (iv) { - if (code = krb5_c_block_size(context, key->enctype, &blocksize)) + code = krb5_c_block_size(context, key->enctype, &blocksize); + if (code) return(code); ivd.length = blocksize; @@ -154,12 +158,13 @@ kg_decrypt(context, key, usage, iv, in, out, length) int length; { krb5_error_code code; - size_t blocksize, enclen; + size_t blocksize; krb5_data ivd, *pivd, outputd; krb5_enc_data inputd; if (iv) { - if (code = krb5_c_block_size(context, key->enctype, &blocksize)) + code = krb5_c_block_size(context, key->enctype, &blocksize); + if (code) return(code); ivd.length = blocksize; diff --git a/src/lib/gssapi/krb5/util_ctxsetup.c b/src/lib/gssapi/krb5/util_ctxsetup.c index 0add6bf73..b989ff699 100644 --- a/src/lib/gssapi/krb5/util_ctxsetup.c +++ b/src/lib/gssapi/krb5/util_ctxsetup.c @@ -103,11 +103,11 @@ kg2_parse_token(minor_status, ptr, token_length, flags, nctypes, ctypes, goto defective; for (i=0; i