summaryrefslogtreecommitdiff
path: root/src/cipher.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-05 12:00:30 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-05 12:00:30 +0000
commit32e76245db3c461aac5ccc0fa256c76da6bb5236 (patch)
treea059058ab714ff415894896e2a302a08e0158e7b /src/cipher.c
parentadded ssl-crypto based implementation of cipher (diff)
removed silly anytun 02 compat handling
Diffstat (limited to 'src/cipher.c')
-rw-r--r--src/cipher.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cipher.c b/src/cipher.c
index 95450ae..4bd9eec 100644
--- a/src/cipher.c
+++ b/src/cipher.c
@@ -261,11 +261,10 @@ int cipher_aesctr_calc_ctr(cipher_t* c, key_derivation_t* kd, seq_nr_t seq_nr, s
if(ret < 0)
return ret;
- int faked_msb = 0;
- if(!c->salt_.buf_[0]) {
+#ifdef ANYTUN_02_COMPAT
+ if(!c->salt_.buf_[0])
c->salt_.buf_[0] = 1;
- faked_msb = 1;
- }
+#endif
memcpy(params->ctr_.salt_.buf_, c->salt_.buf_, C_AESCTR_SALT_LENGTH);
params->ctr_.salt_.zero_ = 0;
@@ -273,13 +272,6 @@ int cipher_aesctr_calc_ctr(cipher_t* c, key_derivation_t* kd, seq_nr_t seq_nr, s
params->ctr_.params_.sender_id_ ^= SENDER_ID_T_HTON(sender_id);
params->ctr_.params_.seq_nr_ ^= SEQ_NR_T_HTON(seq_nr);
-#ifndef ANYTUN_02_COMPAT
- if(faked_msb) {
- c->salt_.buf_[0] = 0;
- params->ctr_.buf_[0] = 0;
- }
-#endif
-
return 0;
}