diff options
author | Ezra Peisach <epeisach@mit.edu> | 2000-10-17 22:59:50 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2000-10-17 22:59:50 +0000 |
commit | 37d6df8704b4210e690ffeb3afc95fd240cceaa2 (patch) | |
tree | ac98d47a9b86e40955ecc4fa6f7db1e0d7a95221 /src/lib/krb5/asn.1/asn1_k_decode.c | |
parent | 4289b42c30a2c905ee3a3614b55861c22a3bbe74 (diff) | |
download | krb5-37d6df8704b4210e690ffeb3afc95fd240cceaa2.zip krb5-37d6df8704b4210e690ffeb3afc95fd240cceaa2.tar.gz krb5-37d6df8704b4210e690ffeb3afc95fd240cceaa2.tar.bz2 |
* asn1buf.h: Lengths are now unsigned int for
asn1buf_ensure_space(), asn1buf_expand(), asn1buf_imbed(),
asn1buf_sync(), asn1buf_insert_octetstring(),
asn1buf_insert_charstring(), asn1_remove_octetstring(),
asn1buf_remove_charstring(),
* krb5_decode.c, krb5_encode.c: Length fields are unsigned ints.
* asn1_make.c, asn1_make.h: Prototypes changed to use an unsigned
int * in_len and retlen for: asn1_make_etag(), asn1_make_tag(),
asn1_make_sequence(), asn1_make_set(), asn1_make_string(),
asn1_make_length(), asn1_make_id().
* asn1_k_encode.h, asn1_k_encode.c: Change length fields to
unsigned ints for all functions.
(asn1_encode_etype_info_entry): Test for KRB5_ETYPE_NO_SALT
instead of -1.
* asn1_k_decode.c (asn1_decode_etype_info_entry): Use a length of
KRB5_ETYPE_NO_SALT to indicate the optional salt not being
present. (instead of -1).
(setup): Length is now unsigned int.
* asn1_get.c, asn1_get.h: Change retlent to unsigned int * for
asn1_get_tag(), asn1_get_tag_indef(), asn1_get_sequence,
asn1_get_length().
* asn1_encode.c, asn1_encode.h: Change retlen to unsigned int *
for asn1_encode_integer(), asn1_encode_unsigned_integer(),
asn1_encode_octetstring(), asn1_encode_charstring(),
asn1_encode_printable_string(), asn1_encode_ia5string(),
asn1_encode_generaltime(), asn1_encode_generalstring()
* asn1_decode.c, asn1_decode.h: Change retlen to unsigned int *
for asn1_decode_octetstring(), asn1_decode_generalstring(),
asn1_decode_charstring(),
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12779 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/asn1_k_decode.c')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index a0c1ba3..b015063 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -34,7 +34,7 @@ asn1_error_code retval;\ asn1_class class;\ asn1_construction construction;\ asn1_tagnum tagnum;\ -int length,taglen +unsigned int length,taglen #define unused_var(x) if(0) x=0 @@ -106,7 +106,7 @@ if(retval) return retval #define sequence_of(buf)\ int size=0;\ asn1buf seqbuf;\ -int length;\ +unsigned int length;\ int indef;\ retval = asn1_get_sequence(buf,&length,&indef);\ if(retval) return retval;\ @@ -373,7 +373,7 @@ asn1_error_code asn1_decode_ticket(buf, val) krb5_ticket * val; { setup(); - int applen; + unsigned int applen; apptag(1); { begin_structure(); { krb5_kvno vno; @@ -652,7 +652,7 @@ asn1_error_code asn1_decode_last_req_entry(buf, val) #ifdef KRB5_GENEROUS_LR_TYPE /* If we are only a single byte wide and negative - fill in the other bits */ - if((val->lr_type & 0xffffff80) == 0x80) val->lr_type |= 0xffffff00; + if((val->lr_type & 0xffffff80U) == 0x80) val->lr_type |= 0xffffff00U; #endif } cleanup(); @@ -691,7 +691,7 @@ asn1_error_code asn1_decode_etype_info_entry(buf, val) if (tagnum == 1) { get_lenfield(val->length,val->salt,1,asn1_decode_octetstring); } else { - val->length = -1; + val->length = KRB5_ETYPE_NO_SALT; val->salt = 0; } end_structure(); |