summaryrefslogtreecommitdiff
path: root/src/keyDerivation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyDerivation.cpp')
-rw-r--r--src/keyDerivation.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp
index 46c1568..fcb3001 100644
--- a/src/keyDerivation.cpp
+++ b/src/keyDerivation.cpp
@@ -198,6 +198,11 @@ bool AesIcmKeyDerivation::generate(kd_dir dir, satp_prf_label label, seq_nr_t se
{
ReadersLock lock(mutex_);
+#ifndef USE_SSL_CRYPTO
+ if(!handle_[dir])
+ return false;
+#endif
+
seq_nr_t r;
calcCtr(dir, &r, label, seq_nr);
// TODO: return stored key
@@ -212,7 +217,6 @@ bool AesIcmKeyDerivation::generate(kd_dir dir, satp_prf_label label, seq_nr_t se
// return false;
// }
-
#ifndef USE_SSL_CRYPTO
gcry_error_t err = gcry_cipher_reset(handle_[dir]);
if(err) {