[krbdev.mit.edu #7634] [PATCH] krb5: fix crypto openssl hmac warning

Gilles Espinasse via RT rt-comment at krbdev.mit.edu
Thu May 9 11:38:07 EDT 2013


hmac.c: In function 'krb5int_hmac_keyblock':
hmac.c:108: warning: initialization discards qualifiers from pointer target type

nss hmac.c already has const here

Signed-off-by: Gilles Espinasse <g.esp at free.fr>
---
 src/lib/crypto/openssl/hmac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/crypto/openssl/hmac.c b/src/lib/crypto/openssl/hmac.c
index f92ce8b..926790a 100644
--- a/src/lib/crypto/openssl/hmac.c
+++ b/src/lib/crypto/openssl/hmac.c
@@ -105,7 +105,7 @@ krb5int_hmac_keyblock(const struct krb5_hash_provider *hash,
     HMAC_CTX_init(&c);
     HMAC_Init(&c, keyblock->contents, keyblock->length, map_digest(hash));
     for (i = 0; i < num_data; i++) {
-        krb5_crypto_iov *iov = &data[i];
+        const krb5_crypto_iov *iov = &data[i];
 
         if (SIGN_IOV(iov))
             HMAC_Update(&c, (unsigned char*) iov->data.data, iov->data.length);
-- 
1.7.2.5




More information about the krb5-bugs mailing list