[28693] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix const correctness on krb5_c_fx_cf2_simple()

daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Jan 26 21:32:36 2015

Date: Mon, 26 Jan 2015 21:30:16 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201501270230.t0R2UGTH019033@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/d67122a21af8c24657fb7dfbb572afad4933b538
commit d67122a21af8c24657fb7dfbb572afad4933b538
Author: Nathaniel McCallum <npmccallum@redhat.com>
Date:   Mon Jan 26 13:59:54 2015 -0500

    Fix const correctness on krb5_c_fx_cf2_simple()
    
    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)

 src/include/krb5/krb5.hin |    4 ++--
 src/lib/crypto/krb/cf2.c  |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 6f7cff4..af2e1fb 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -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);
 
 /**
diff --git a/src/lib/crypto/krb/cf2.c b/src/lib/crypto/krb/cf2.c
index a0654b6..49584ef 100644
--- a/src/lib/crypto/krb/cf2.c
+++ b/src/lib/crypto/krb/cf2.c
@@ -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;
@@ -88,8 +88,8 @@ cleanup:
 
 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;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post