summaryrefslogtreecommitdiff
path: root/keyDerivation.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-12 16:10:58 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-12 16:10:58 +0000
commit974d6973f4479c0f5bacc0a5ce07a5cfc62bb01c (patch)
treed537dabd53431fd071e24812982964ebdae2f2f7 /keyDerivation.cpp
parentadded newline (diff)
* renamed HmacAuthAlgo to Sha1AuthAlgo
* removed a memleak at the IV generation in kd, cypher
Diffstat (limited to 'keyDerivation.cpp')
-rw-r--r--keyDerivation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/keyDerivation.cpp b/keyDerivation.cpp
index 4ed87ad..dbef123 100644
--- a/keyDerivation.cpp
+++ b/keyDerivation.cpp
@@ -133,7 +133,9 @@ void KeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key,
if( err )
cLog.msg(Log::PRIO_ERR) << "KeyDerivation::generate: Failed to reset cipher: " << gpg_strerror( err );
- err = gcry_cipher_setiv( cipher_ , iv.getBuf(16), 16);
+ u_int8_t *iv_buf = iv.getNewBuf(16);
+ err = gcry_cipher_setiv( cipher_ , iv_buf, 16);
+ delete[] iv_buf;
if( err )
cLog.msg(Log::PRIO_ERR) << "KeyDerivation::generate: Failed to set IV: " << gpg_strerror( err );