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
+2001-05-14 Ezra Peisach <epeisach@mit.edu>
+
+ * 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 <epeisach@mit.edu>
* util_crypt.c (kg_make_confounder): Change variable random to
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;
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);
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 */
* $Id$
*/
+
+/* For declaration of krb5_ser_context_init */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
/** exported constants defined in gssapi_krb5{,_nx}.h **/
}
+#if 0
static krb5_error_code
make_ap_req_v2(context, ctx, cred, k_cred, chan_bindings, mech_type, token)
krb5_context context;
{
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)
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)))
} 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;
/* 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;
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;
size_t *lenremain;
{
krb5_error_code kret;
- gss_OID oid;
krb5_int32 ibuf;
krb5_octet *bp;
size_t remain;
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;
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);
}
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);
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;
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);
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;
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;
goto defective;
for (i=0; i<noptions; i++) {
- if (options[i].option_id = opt_id) {
+ if (options[i].option_id == opt_id) {
options[i].length = field_length;
options[i].data = ptr;
+ break;
}
- break;
}
ptr += field_length;
krb5_keyblock *tmpkey;
int i;
- if (code = krb5_copy_keyblock(context, key, &tmpkey))
+ code = krb5_copy_keyblock(context, key, &tmpkey);
+ if (code)
return(code);
/* reverse the key bytes, as per spec */
krb5_error_code code;
unsigned char plain[8];
- if (code = kg_decrypt(context, key, KG_USAGE_SEQ, cksum, buf, plain, 8))
+ code = kg_decrypt(context, key, KG_USAGE_SEQ, cksum, buf, plain, 8);
+ if (code)
return(code);
if ((plain[4] != plain[5]) ||
{
krb5_context context;
krb5_gss_ctx_id_rec *ctx;
- krb5_error_code code;
OM_uint32 data_size, conflen;
OM_uint32 ohlen;
int overhead;