summaryrefslogtreecommitdiff
path: root/src/keyDerivation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyDerivation.cpp')
-rw-r--r--src/keyDerivation.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp
index 2e9dd94..72a7fa4 100644
--- a/src/keyDerivation.cpp
+++ b/src/keyDerivation.cpp
@@ -178,14 +178,6 @@ AesIcmKeyDerivation::AesIcmKeyDerivation() : KeyDerivation(DEFAULT_KEY_LENGTH)
#endif
}
-AesIcmKeyDerivation::AesIcmKeyDerivation(bool a) : KeyDerivation(a, DEFAULT_KEY_LENGTH)
-{
-#ifndef USE_SSL_CRYPTO
- for(int i=0; i<2; i++)
- handle_[i] = NULL;
-#endif
-}
-
AesIcmKeyDerivation::AesIcmKeyDerivation(u_int16_t key_length) : KeyDerivation(key_length)
{
#ifndef USE_SSL_CRYPTO
@@ -194,14 +186,6 @@ AesIcmKeyDerivation::AesIcmKeyDerivation(u_int16_t key_length) : KeyDerivation(k
#endif
}
-AesIcmKeyDerivation::AesIcmKeyDerivation(bool a, u_int16_t key_length) : KeyDerivation(a, key_length)
-{
-#ifndef USE_SSL_CRYPTO
- for(int i=0; i<2; i++)
- handle_[i] = NULL;
-#endif
-}
-
AesIcmKeyDerivation::~AesIcmKeyDerivation()
{
WritersLock lock(mutex_);
@@ -304,14 +288,8 @@ bool AesIcmKeyDerivation::calcCtr(kd_dir_t dir, satp_prf_label_t label, seq_nr_t
}
memcpy(ctr_[dir].salt_.buf_, master_salt_.getBuf(), SALT_LENGTH);
ctr_[dir].salt_.zero_ = 0;
- if(anytun02_compat_) {
- ctr_[dir].params_compat_.label_ ^= label;
- ctr_[dir].params_compat_.seq_ ^= SEQ_NR_T_HTON(seq_nr);
- }
- else {
- ctr_[dir].params_.label_ ^= SATP_PRF_LABEL_T_HTON(convertLabel(dir, label));
- ctr_[dir].params_.seq_ ^= SEQ_NR_T_HTON(seq_nr);
- }
+ ctr_[dir].params_.label_ ^= SATP_PRF_LABEL_T_HTON(convertLabel(dir, label));
+ ctr_[dir].params_.seq_ ^= SEQ_NR_T_HTON(seq_nr);
return true;
}