summaryrefslogtreecommitdiff
path: root/src/keyDerivation.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-11-28 17:39:14 +0000
committerOthmar Gsenger <otti@anytun.org>2008-11-28 17:39:14 +0000
commit409d58d0b63a113b29d8ce7c75a70e6dbbb39e69 (patch)
tree27a2526d6fc3b4600f18572e77f9fb8890ccfb39 /src/keyDerivation.cpp
parentfixed datatypes (really using boost now) (diff)
added compile time options NOCRYPT,NODAEMON,NOEXEC for easyier windows porting
moved crypto init functions to cryptinit.hpp and exec to sysexec.hpp (as this will be platform dependant)
Diffstat (limited to 'src/keyDerivation.cpp')
-rw-r--r--src/keyDerivation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp
index 1c88352..946943e 100644
--- a/src/keyDerivation.cpp
+++ b/src/keyDerivation.cpp
@@ -32,15 +32,16 @@
#include "log.h"
#include "keyDerivation.h"
-#include "mpi.h"
#include "threadUtils.hpp"
#include <stdexcept>
#include <iostream>
#include <string>
+#ifndef NOCRYPT
#include <gcrypt.h>
-
+#include "mpi.h"
+#endif
void KeyDerivation::setLogKDRate(const uint8_t log_rate)
{
@@ -56,6 +57,7 @@ void NullKeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer&
for(u_int32_t i=0; i < key.getLength(); ++i) key[i] = 0;
}
+#ifndef NOCRYPT
//****** AesIcmKeyDerivation ******
AesIcmKeyDerivation::~AesIcmKeyDerivation()
@@ -165,4 +167,5 @@ void AesIcmKeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer
cLog.msg(Log::PRIO_ERR) << "KeyDerivation::generate: Failed to generate cipher bitstream: " << gpg_strerror_r(err, buf, STERROR_TEXT_MAX);
}
}
+#endif