diff options
author | Luke Howard <lukeh@padl.com> | 2010-05-14 18:21:44 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2010-05-14 18:21:44 +0000 |
commit | c27a00a4cd9932a97bf3f03fafa0f72a176ddaf2 (patch) | |
tree | 250afefd4c448ab4af09076e92ab67fb1a04df84 | |
parent | 1dd837a7f9483944311a92d16b121743b12b89b3 (diff) | |
download | krb5-c27a00a4cd9932a97bf3f03fafa0f72a176ddaf2.zip krb5-c27a00a4cd9932a97bf3f03fafa0f72a176ddaf2.tar.gz krb5-c27a00a4cd9932a97bf3f03fafa0f72a176ddaf2.tar.bz2 |
cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/camellia-ccm@24038 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/crypto/krb/dk/stringtokey.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/crypto/krb/dk/stringtokey.c b/src/lib/crypto/krb/dk/stringtokey.c index 0eacb2f..fd4bf28 100644 --- a/src/lib/crypto/krb/dk/stringtokey.c +++ b/src/lib/crypto/krb/dk/stringtokey.c @@ -116,7 +116,7 @@ pbkdf2_string_to_key(const struct krb5_keytypes *ktp, static const krb5_data usage = { KV5M_DATA, 8, "kerberos" }; krb5_key tempkey = NULL; krb5_error_code err; - krb5_data spepper = empty_data(); + krb5_data sandp = empty_data(); if (params) { unsigned char *p = (unsigned char *) params->data; @@ -145,15 +145,15 @@ pbkdf2_string_to_key(const struct krb5_keytypes *ktp, return KRB5_CRYPTO_INTERNAL; if (pepper != NULL) { - err = alloc_data(&spepper, pepper->length + 1 + salt->length); + err = alloc_data(&sandp, pepper->length + 1 + salt->length); if (err) return err; - memcpy(spepper.data, pepper->data, pepper->length); - spepper.data[pepper->length] = '\0'; - memcpy(&spepper.data[pepper->length + 1], salt->data, salt->length); + memcpy(sandp.data, pepper->data, pepper->length); + sandp.data[pepper->length] = '\0'; + memcpy(&sandp.data[pepper->length + 1], salt->data, salt->length); - salt = &spepper; + salt = &sandp; } err = krb5int_pbkdf2_hmac_sha1 (&out, iter_count, string, salt); @@ -167,8 +167,8 @@ pbkdf2_string_to_key(const struct krb5_keytypes *ktp, err = krb5int_derive_keyblock(ktp->enc, tempkey, key, &usage); cleanup: - if (spepper.data) - free(spepper.data); + if (sandp.data) + free(sandp.data); if (err) memset (out.data, 0, out.length); krb5_k_free_key (NULL, tempkey); |