summaryrefslogtreecommitdiff
path: root/src/uanytun.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-18 12:05:20 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-18 12:05:20 +0000
commit8ea43400a34855e8cd9092a2c4c0d969cf0be80d (patch)
tree16a23bb99930d702f157e4bec2524ee3c725bdef /src/uanytun.c
parentupdated kamikaze package description (diff)
added runtime switch for anytun 0.2 crypto compability
Diffstat (limited to 'src/uanytun.c')
-rw-r--r--src/uanytun.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/uanytun.c b/src/uanytun.c
index e8a8804..d52ef7d 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -101,7 +101,7 @@ typedef u_int8_t auth_algo_t;
int init_main_loop(options_t* opt, cipher_t* c, auth_algo_t* aa, key_derivation_t* kd, seq_win_t* seq_win)
{
- int ret = cipher_init(c, opt->cipher_);
+ int ret = cipher_init(c, opt->cipher_, opt->anytun02_compat_);
if(ret) {
log_printf(ERR, "could not initialize cipher of type %s", opt->cipher_);
return ret;
@@ -115,7 +115,9 @@ int init_main_loop(options_t* opt, cipher_t* c, auth_algo_t* aa, key_derivation_
return ret;
}
- ret = key_derivation_init(kd, opt->kd_prf_, opt->ld_kdr_, opt->passphrase_, opt->key_.buf_, opt->key_.length_, opt->salt_.buf_, opt->salt_.length_);
+ if(opt->anytun02_compat_)
+ log_printf(ERR, "enabling anytun 0.2.x crypto compatiblity mode");
+ ret = key_derivation_init(kd, opt->kd_prf_, opt->ld_kdr_, opt->anytun02_compat_, opt->passphrase_, opt->key_.buf_, opt->key_.length_, opt->salt_.buf_, opt->salt_.length_);
if(ret) {
log_printf(ERR, "could not initialize key derivation of type %s", opt->kd_prf_);
cipher_close(c);