From a39dd07546ab48648021f03e87b2831ffaf50df8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 18 Jan 2009 23:31:33 +0000 Subject: some cleanup --- src/keyDerivation.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/keyDerivation.cpp') 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 #include +#ifndef NO_CRYPT +#ifndef NO_PASSPHRASE #ifdef USE_SSL_CRYPTO #include #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) -- cgit v1.2.3