Skip to content

Commit

Permalink
Fix const correctness on krb5_c_fx_cf2_simple()
Browse files Browse the repository at this point in the history
libk5crypto functions generally use "const krb5_keyblock *" for input
keyblocks.  Do this in krb5_c_fx_cf2_simple() for caller convenience.

[ghudson@mit.edu: expanded commit message]

ticket: 8062 (new)
  • Loading branch information
npmccallum authored and greghudson committed Jan 27, 2015
1 parent c0778ab commit d67122a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/include/krb5/krb5.hin
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ krb5_c_prf_length(krb5_context context, krb5_enctype enctype, size_t *len);
*/
krb5_error_code KRB5_CALLCONV
krb5_c_fx_cf2_simple(krb5_context context,
krb5_keyblock *k1, const char *pepper1,
krb5_keyblock *k2, const char *pepper2,
const krb5_keyblock *k1, const char *pepper1,
const krb5_keyblock *k2, const char *pepper2,
krb5_keyblock **out);

/**
Expand Down
6 changes: 3 additions & 3 deletions src/lib/crypto/krb/cf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* a count byte to get enough bits of output.
*/
static krb5_error_code
prf_plus(krb5_context context, krb5_keyblock *k, const char *pepper,
prf_plus(krb5_context context, const krb5_keyblock *k, const char *pepper,
size_t keybytes, char **out)
{
krb5_error_code retval = 0;
Expand Down Expand Up @@ -88,8 +88,8 @@ prf_plus(krb5_context context, krb5_keyblock *k, const char *pepper,

krb5_error_code KRB5_CALLCONV
krb5_c_fx_cf2_simple(krb5_context context,
krb5_keyblock *k1, const char *pepper1,
krb5_keyblock *k2, const char *pepper2,
const krb5_keyblock *k1, const char *pepper1,
const krb5_keyblock *k2, const char *pepper2,
krb5_keyblock **out)
{
const struct krb5_keytypes *out_enctype;
Expand Down

0 comments on commit d67122a

Please sign in to comment.