* accept_sec_context.c (krb5_gss_accept_sec_context): Use unsigned
authorEzra Peisach <epeisach@mit.edu>
Fri, 15 Nov 2002 16:12:20 +0000 (16:12 +0000)
committerEzra Peisach <epeisach@mit.edu>
Fri, 15 Nov 2002 16:12:20 +0000 (16:12 +0000)
        lengths for arguments to g_token_size and g_make_token_header.

        * export_name.c (krb5_gss_export_name): Change local length
        variable to unsigned.

        * k5unseal.c (kg_unseal_v1): Seqnum variable changed from
        krb5_int32 to krb5_ui_4.

        * k5seal.c (make_seal_token_v1): Change seqnum argument to
        krb5_ui_4 from krb5_int32 to match krb5_gss_ctx_id_rec struct.

        * gssapiP_krb5.h, util_crypt.c, util_seqnum.c: kg_make_seq_num(),
        kg_get_seq_num() changed to use krb5_ui_4 for sequence
        numbers. kg_encrypt(), kg_decrypt() length argument now unsigned.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15007 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/ChangeLog
src/lib/gssapi/krb5/accept_sec_context.c
src/lib/gssapi/krb5/export_name.c
src/lib/gssapi/krb5/gssapiP_krb5.h
src/lib/gssapi/krb5/k5seal.c
src/lib/gssapi/krb5/k5unseal.c
src/lib/gssapi/krb5/util_crypt.c
src/lib/gssapi/krb5/util_seqnum.c

index fb5dbf13d283b5fbf292e6d00e0823f70f20d748..f649da399db60375dd4783a3c7ad798aa6cf20cb 100644 (file)
@@ -1,3 +1,21 @@
+2002-11-15  Ezra Peisach  <epeisach@bu.edu>
+
+       * accept_sec_context.c (krb5_gss_accept_sec_context): Use unsigned
+       lengths for arguments to g_token_size and g_make_token_header.
+
+       * export_name.c (krb5_gss_export_name): Change local length
+       variable to unsigned.
+
+       * k5unseal.c (kg_unseal_v1): Seqnum variable changed from
+       krb5_int32 to krb5_ui_4.
+
+       * k5seal.c (make_seal_token_v1): Change seqnum argument to
+       krb5_ui_4 from krb5_int32 to match krb5_gss_ctx_id_rec struct.
+
+       * gssapiP_krb5.h, util_crypt.c, util_seqnum.c: kg_make_seq_num(),
+       kg_get_seq_num() changed to use krb5_ui_4 for sequence
+       numbers. kg_encrypt(), kg_decrypt() length argument now unsigned.
+
 2002-10-07  Sam Hartman  <hartmans@mit.edu>
 
        * Makefile.in :  Add install-headers support
index 5ba8bc820f2de50340835be17a754bb75a8f2fb8..c0efb3db1b8adeac7aa709f1d61fa15025c3bea3 100644 (file)
@@ -842,7 +842,8 @@ krb5_gss_accept_sec_context(minor_status, context_handle,
    }
 
    if (cred && (gss_flags & GSS_C_MUTUAL_FLAG)) {
-       int tmsglen, toktype;
+       unsigned int tmsglen;
+       int toktype;
 
        /*
        * The client is expecting a response, so we can send an
index 5671e5e9af71c9bc7bb9946b535d8bb969036fda..cab284cc3663a8439b65f3f6e23deca7f46098c3 100644 (file)
@@ -33,7 +33,7 @@ OM_uint32 krb5_gss_export_name(OM_uint32  *minor_status,
 {
        krb5_context context;
        krb5_error_code code;
-       int length;
+       size_t length;
        char *str, *cp;
 
        if (GSS_ERROR(kg_get_context(minor_status, &context)))
index a51db06bbc0225310feafbb9df36a92bf44dce18..3b5bf17e18e0856febe33725ea1a259151f87251 100644 (file)
@@ -214,13 +214,13 @@ krb5_error_code kg_checksum_channel_bindings
 
 krb5_error_code kg_make_seq_num (krb5_context context,
                                           krb5_keyblock *key,
-            int direction, krb5_int32 seqnum, unsigned char *cksum,
+            int direction, krb5_ui_4 seqnum, unsigned char *cksum,
                                unsigned char *buf);
 
 krb5_error_code kg_get_seq_num (krb5_context context,
                                          krb5_keyblock *key,
             unsigned char *cksum, unsigned char *buf, int *direction,
-                                         krb5_int32 *seqnum);
+                                         krb5_ui_4 *seqnum);
 
 krb5_error_code kg_make_seed (krb5_context context,
                                        krb5_keyblock *key,
@@ -236,7 +236,7 @@ krb5_error_code kg_encrypt (krb5_context context,
                                      krb5_pointer iv,
                                      krb5_pointer in,
                                      krb5_pointer out,
-                                     int length);
+                                     unsigned int length);
 krb5_error_code
 kg_arcfour_docrypt (const krb5_keyblock *longterm_key , int ms_usage,
                    const unsigned char *kd_data, size_t kd_data_len,
@@ -248,7 +248,7 @@ krb5_error_code kg_decrypt (krb5_context context,
                                      krb5_pointer iv,
                                      krb5_pointer in,
                                      krb5_pointer out,
-                                     int length);
+                                     unsigned int length);
 
 OM_uint32 kg_seal (krb5_context context,
                  OM_uint32 *minor_status,
index 6631961a4ba342ef387bae89388ac225319c9b91..3c8702a555ccd7f6b7c2dbb7aadfc2f14833aa82 100644 (file)
@@ -54,7 +54,7 @@ static krb5_error_code
 make_seal_token_v1 (krb5_context context,
                    krb5_keyblock *enc,
                    krb5_keyblock *seq,
-                   krb5_int32 *seqnum,
+                   krb5_ui_4 *seqnum,
                    int direction,
                    gss_buffer_t text,
                    gss_buffer_t token,
index d51c608e024c2f29a5789ff2a8ef636ea06a1b83..347d6b8524169cbc6c704f70dbd09a3847ba394f 100644 (file)
@@ -83,7 +83,7 @@ kg_unseal_v1(context, minor_status, ctx, ptr, bodysize, message_buffer,
     int cksum_len = 0;
     int plainlen;
     int direction;
-    krb5_int32 seqnum;
+    krb5_ui_4 seqnum;
     OM_uint32 retval;
     size_t sumlen;
     krb5_keyusage sign_usage = KG_USAGE_SIGN;
index bf30ccc6ff31abc586baa3852bf8cb388a1d04d1..ec2f25375a1fd9d165cf74e09c70da8ca2ebe6b7 100644 (file)
@@ -98,7 +98,7 @@ kg_encrypt(context, key, usage, iv, in, out, length)
      krb5_pointer iv;
      krb5_pointer in;
      krb5_pointer out;
-     int length;
+     unsigned int length;
 {
    krb5_error_code code;
    size_t blocksize;
@@ -142,7 +142,7 @@ kg_decrypt(context, key, usage, iv, in, out, length)
      krb5_pointer iv;
      krb5_pointer in;
      krb5_pointer out;
-     int length;
+     unsigned int length;
 {
    krb5_error_code code;
    size_t blocksize;
index 4b44b8e5c898ed008edbe70dd2bd8b0e6181b619..ec7da556729eefbfefcc006aecb44099966dc74a 100644 (file)
@@ -33,7 +33,7 @@ kg_make_seq_num(context, key, direction, seqnum, cksum, buf)
      krb5_context context;
      krb5_keyblock *key;
      int direction;
-     krb5_int32 seqnum;
+     krb5_ui_4 seqnum;
      unsigned char *cksum;
      unsigned char *buf;
 {
@@ -70,7 +70,7 @@ krb5_error_code kg_get_seq_num(context, key, cksum, buf, direction, seqnum)
      unsigned char *cksum;
      unsigned char *buf;
      int *direction;
-     krb5_int32 *seqnum;
+     krb5_ui_4 *seqnum;
 {
    krb5_error_code code;
    unsigned char plain[8];