summaryrefslogtreecommitdiff
path: root/src/keyDerivation.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-18 23:31:33 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-18 23:31:33 +0000
commita39dd07546ab48648021f03e87b2831ffaf50df8 (patch)
tree788b8db0b2dd4162318084739b863412b7a73612 /src/keyDerivation.cpp
parentdoing replay protection before learning remote host (diff)
some cleanup
Diffstat (limited to 'src/keyDerivation.cpp')
-rw-r--r--src/keyDerivation.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp
index 48db034..db8cc1b 100644
--- a/src/keyDerivation.cpp
+++ b/src/keyDerivation.cpp
@@ -41,9 +41,13 @@
#include <sstream>
#include <string>
+#ifndef NO_CRYPT
+#ifndef NO_PASSPHRASE
#ifdef USE_SSL_CRYPTO
#include <openssl/sha.h>
#endif
+#endif
+#endif
void KeyDerivation::setLogKDRate(const int8_t log_rate)
{
@@ -53,6 +57,7 @@ void KeyDerivation::setLogKDRate(const int8_t log_rate)
ld_kdr_ = sizeof(seq_nr_t) * 8;
}
+#ifndef NO_CRYPT
#ifndef NO_PASSPHRASE
void KeyDerivation::calcMasterKey(std::string passphrase, u_int16_t length)
{
@@ -112,6 +117,7 @@ void KeyDerivation::calcMasterSalt(std::string passphrase, u_int16_t length)
memcpy(master_salt_.getBuf(), &digest.getBuf()[digest.getLength() - master_salt_.getLength()], master_salt_.getLength());
}
#endif
+#endif
//****** NullKeyDerivation ******
@@ -121,7 +127,7 @@ bool NullKeyDerivation::generate(kd_dir_t dir, satp_prf_label_t label, seq_nr_t
return true;
}
-#ifndef NOCRYPT
+#ifndef NO_CRYPT
//****** AesIcmKeyDerivation ******
AesIcmKeyDerivation::AesIcmKeyDerivation() : KeyDerivation(DEFAULT_KEY_LENGTH)