diff options
author | Ken Raeburn <raeburn@mit.edu> | 2002-02-23 03:20:52 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2002-02-23 03:20:52 +0000 |
commit | 6c6ba503a75ded60735f982b20013b0d2cfbff8c (patch) | |
tree | 15a48dcad0b612245e5cd35acebb9c1ad1f377e5 /src/lib | |
parent | b455187ffb3a88ef0337dbf634a38265a2580445 (diff) | |
download | krb5-6c6ba503a75ded60735f982b20013b0d2cfbff8c.zip krb5-6c6ba503a75ded60735f982b20013b0d2cfbff8c.tar.gz krb5-6c6ba503a75ded60735f982b20013b0d2cfbff8c.tar.bz2 |
Use const instead of krb5_const
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14161 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/crypto/arcfour/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/crypto/arcfour/arcfour.c | 24 | ||||
-rw-r--r-- | src/lib/crypto/arcfour/arcfour.h | 30 | ||||
-rw-r--r-- | src/lib/crypto/arcfour/string_to_key.c | 6 | ||||
-rw-r--r-- | src/lib/crypto/enc_provider/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/crypto/enc_provider/arcfour.c | 12 | ||||
-rw-r--r-- | src/lib/kdb/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/kdb/kdb_xdr.c | 2 |
8 files changed, 51 insertions, 37 deletions
diff --git a/src/lib/crypto/arcfour/ChangeLog b/src/lib/crypto/arcfour/ChangeLog index 74647d5..8201671 100644 --- a/src/lib/crypto/arcfour/ChangeLog +++ b/src/lib/crypto/arcfour/ChangeLog @@ -1,3 +1,8 @@ +2002-02-22 Ken Raeburn <raeburn@mit.edu> + + * arcfour.h, arcfour.c, string_to_key.c: Use const instead of + krb5_const. + 2001-12-05 Ezra Peisach <epeisach@mit.edu> * string_to_key.c (krb5_arcfour_string_to_key): Use size_t instead diff --git a/src/lib/crypto/arcfour/arcfour.c b/src/lib/crypto/arcfour/arcfour.c index acf7082..c4b06bb 100644 --- a/src/lib/crypto/arcfour/arcfour.c +++ b/src/lib/crypto/arcfour/arcfour.c @@ -12,8 +12,8 @@ const char *l40 = "fortybits"; void krb5_arcfour_encrypt_length(enc, hash, inputlen, length) - krb5_const struct krb5_enc_provider *enc; - krb5_const struct krb5_hash_provider *hash; + const struct krb5_enc_provider *enc; + const struct krb5_hash_provider *hash; size_t inputlen; size_t *length; { @@ -64,12 +64,12 @@ case 7: /* tgs-req authenticator */ krb5_error_code krb5_arcfour_encrypt(enc, hash, key, usage, ivec, input, output) - krb5_const struct krb5_enc_provider *enc; - krb5_const struct krb5_hash_provider *hash; - krb5_const krb5_keyblock *key; + const struct krb5_enc_provider *enc; + const struct krb5_hash_provider *hash; + const krb5_keyblock *key; krb5_keyusage usage; - krb5_const krb5_data *ivec; - krb5_const krb5_data *input; + const krb5_data *ivec; + const krb5_data *input; krb5_data *output; { krb5_keyblock k1, k2, k3; @@ -192,12 +192,12 @@ krb5_arcfour_encrypt(enc, hash, key, usage, ivec, input, output) /* This is the arcfour-hmac decryption routine */ krb5_error_code krb5_arcfour_decrypt(enc, hash, key, usage, ivec, input, output) - krb5_const struct krb5_enc_provider *enc; - krb5_const struct krb5_hash_provider *hash; - krb5_const krb5_keyblock *key; + const struct krb5_enc_provider *enc; + const struct krb5_hash_provider *hash; + const krb5_keyblock *key; krb5_keyusage usage; - krb5_const krb5_data *ivec; - krb5_const krb5_data *input; + const krb5_data *ivec; + const krb5_data *input; krb5_data *output; { krb5_keyblock k1,k2,k3; diff --git a/src/lib/crypto/arcfour/arcfour.h b/src/lib/crypto/arcfour/arcfour.h index c16ae77..39bf824 100644 --- a/src/lib/crypto/arcfour/arcfour.h +++ b/src/lib/crypto/arcfour/arcfour.h @@ -2,33 +2,33 @@ #define ARCFOUR_H extern void -krb5_arcfour_encrypt_length(krb5_const struct krb5_enc_provider *, - krb5_const struct krb5_hash_provider *, +krb5_arcfour_encrypt_length(const struct krb5_enc_provider *, + const struct krb5_hash_provider *, size_t, size_t *); extern -krb5_error_code krb5_arcfour_encrypt(krb5_const struct krb5_enc_provider *, - krb5_const struct krb5_hash_provider *, - krb5_const krb5_keyblock *, +krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *, + const struct krb5_hash_provider *, + const krb5_keyblock *, krb5_keyusage, - krb5_const krb5_data *, - krb5_const krb5_data *, + const krb5_data *, + const krb5_data *, krb5_data *); extern -krb5_error_code krb5_arcfour_decrypt(krb5_const struct krb5_enc_provider *, - krb5_const struct krb5_hash_provider *, - krb5_const krb5_keyblock *, +krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *, + const struct krb5_hash_provider *, + const krb5_keyblock *, krb5_keyusage, - krb5_const krb5_data *, - krb5_const krb5_data *, + const krb5_data *, + const krb5_data *, krb5_data *); extern krb5_error_code krb5_arcfour_string_to_key( - krb5_const struct krb5_enc_provider *, - krb5_const krb5_data *, - krb5_const krb5_data *, + const struct krb5_enc_provider *, + const krb5_data *, + const krb5_data *, krb5_keyblock *); extern const struct krb5_enc_provider krb5int_enc_arcfour; diff --git a/src/lib/crypto/arcfour/string_to_key.c b/src/lib/crypto/arcfour/string_to_key.c index a40f1ff..1fecd4d 100644 --- a/src/lib/crypto/arcfour/string_to_key.c +++ b/src/lib/crypto/arcfour/string_to_key.c @@ -13,9 +13,9 @@ static void asctouni(unsigned char *unicode, unsigned char *ascii, size_t len) krb5_error_code krb5_arcfour_string_to_key(enc, string, salt, key) - krb5_const struct krb5_enc_provider *enc; - krb5_const krb5_data *string; - krb5_const krb5_data *salt; + const struct krb5_enc_provider *enc; + const krb5_data *string; + const krb5_data *salt; krb5_keyblock *key; { size_t len,slen; diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index 4b06974..bb66d7b 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,3 +1,7 @@ +2002-02-22 Ken Raeburn <raeburn@mit.edu> + + * arcfour.c: Use const instead of krb5_const. + 2001-11-06 Sam Hartman <hartmans@mit.edu> * arcfour.c (k5_arcfour_docrypt): Treat state as an diff --git a/src/lib/crypto/enc_provider/arcfour.c b/src/lib/crypto/enc_provider/arcfour.c index 28627b7..bfdc193 100644 --- a/src/lib/crypto/enc_provider/arcfour.c +++ b/src/lib/crypto/enc_provider/arcfour.c @@ -26,8 +26,8 @@ static void k5_arcfour_crypt(ArcfourContext *ctx, unsigned char *dest, /* Interface layer to kerb5 crypto layer */ static krb5_error_code -k5_arcfour_docrypt(krb5_const krb5_keyblock *, krb5_const krb5_data *, - krb5_const krb5_data *, krb5_data *); +k5_arcfour_docrypt(const krb5_keyblock *, const krb5_data *, + const krb5_data *, krb5_data *); /* The blocksize for the enctype */ @@ -38,7 +38,7 @@ static void k5_arcfour_keysize(size_t *, size_t *); /* from a random bitstrem, construct a key */ static krb5_error_code -k5_arcfour_make_key(krb5_const krb5_data *, krb5_keyblock *); +k5_arcfour_make_key(const krb5_data *, krb5_keyblock *); static unsigned char arcfour_weakkey1[] = {0x00, 0x00, 0xfd}; static unsigned char arcfour_weakkey2[] = {0x03, 0xfd, 0xfc}; @@ -142,8 +142,8 @@ k5_arcfour_keysize(size_t *keybytes, size_t *keylength) /* The workhorse of the arcfour system, this impliments the cipher */ static krb5_error_code -k5_arcfour_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *state, - krb5_const krb5_data *input, krb5_data *output) +k5_arcfour_docrypt(const krb5_keyblock *key, const krb5_data *state, + const krb5_data *input, krb5_data *output) { ArcfourContext *arcfour_ctx; ArcFourCipherState *cipher_state; @@ -185,7 +185,7 @@ k5_arcfour_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *state, } static krb5_error_code -k5_arcfour_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key) +k5_arcfour_make_key(const krb5_data *randombits, krb5_keyblock *key) { if (key->length != 16) return(KRB5_BAD_KEYSIZE); diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 74cac90..0be133d 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +2002-02-22 Ken Raeburn <raeburn@mit.edu> + + * kdb_xdr.c (krb5_dbe_lookup_mod_princ_data): Use const instead of + krb5_const. + 2001-11-19 Ezra Peisach <epeisach@mit.edu> * t_kdb.c (do_testing): Invoke krb5_free_principal and diff --git a/src/lib/kdb/kdb_xdr.c b/src/lib/kdb/kdb_xdr.c index adcfbd7..0dcf1ba 100644 --- a/src/lib/kdb/kdb_xdr.c +++ b/src/lib/kdb/kdb_xdr.c @@ -237,7 +237,7 @@ krb5_dbe_lookup_mod_princ_data(context, entry, mod_time, mod_princ) /* Mod Princ */ if ((code = krb5_parse_name(context, - (krb5_const char *) (tl_data.tl_data_contents+4), + (const char *) (tl_data.tl_data_contents+4), mod_princ))) return(code); |