diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-03-29 01:57:31 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-03-29 01:59:33 -0400 |
commit | fd557fc3de99f63b37ae78a0f43968c162524baa (patch) | |
tree | 2a525dd97176b412921e6df8dcc9d7c41a6f045c /src/lib/crypto | |
parent | 49f908733b5ddf491e53c7c84d0cbae263e31eae (diff) | |
download | krb5-fd557fc3de99f63b37ae78a0f43968c162524baa.zip krb5-fd557fc3de99f63b37ae78a0f43968c162524baa.tar.gz krb5-fd557fc3de99f63b37ae78a0f43968c162524baa.tar.bz2 |
Clean up cksum handling in CMAC token functions
In krb5int_dk_cmac_encrypt, cksum wasn't used. In
krb5int_dk_cmac_decrypt, cksum needs to be initialized since we clean
it up.
Diffstat (limited to 'src/lib/crypto')
-rw-r--r-- | src/lib/crypto/krb/enc_dk_cmac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/crypto/krb/enc_dk_cmac.c b/src/lib/crypto/krb/enc_dk_cmac.c index 508f9f8..e27c862 100644 --- a/src/lib/crypto/krb/enc_dk_cmac.c +++ b/src/lib/crypto/krb/enc_dk_cmac.c @@ -89,7 +89,6 @@ krb5int_dk_cmac_encrypt(const struct krb5_keytypes *ktp, krb5_key key, const struct krb5_enc_provider *enc = ktp->enc; krb5_error_code ret; krb5_crypto_iov *header, *trailer, *padding; - krb5_data cksum = empty_data(); krb5_key ke = NULL, ki = NULL; /* E(Confounder | Plaintext | Pad) | Checksum */ @@ -129,7 +128,6 @@ krb5int_dk_cmac_encrypt(const struct krb5_keytypes *ktp, krb5_key key, cleanup: krb5_k_free_key(NULL, ke); krb5_k_free_key(NULL, ki); - zapfree(cksum.data, cksum.length); return ret; } @@ -141,7 +139,7 @@ krb5int_dk_cmac_decrypt(const struct krb5_keytypes *ktp, krb5_key key, const struct krb5_enc_provider *enc = ktp->enc; krb5_error_code ret; krb5_crypto_iov *header, *trailer; - krb5_data cksum; + krb5_data cksum = empty_data(); krb5_key ke = NULL, ki = NULL; /* E(Confounder | Plaintext | Pad) | Checksum */ |