diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/key_derivation.c | 4 | ||||
-rw-r--r-- | src/key_derivation.h | 2 | ||||
-rw-r--r-- | src/options.c | 3 | ||||
-rw-r--r-- | src/uanytun.c | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/key_derivation.c b/src/key_derivation.c index 957cba0..a4b1c9f 100644 --- a/src/key_derivation.c +++ b/src/key_derivation.c @@ -447,9 +447,9 @@ int key_derivation_aesctr_generate(key_derivation_t* kd, key_store_dir_t dir, sa return -1; } u_int32_t num = 0; - memset(params->ecount_buf, 0, AES_BLOCK_SIZE); + memset(params->ecount_buf_, 0, AES_BLOCK_SIZE); memset(key, 0, len); - AES_ctr128_encrypt(key, key, len, ¶ms->aes_key_, params->ctr_.buf_, params->ecount_buf, &num); + AES_ctr128_encrypt(key, key, len, ¶ms->aes_key_, params->ctr_.buf_, params->ecount_buf_, &num); #endif if(!kd->ld_kdr_) diff --git a/src/key_derivation.h b/src/key_derivation.h index 1e849af..9bdb8f3 100644 --- a/src/key_derivation.h +++ b/src/key_derivation.h @@ -116,7 +116,7 @@ struct key_derivation_aesctr_param_struct { gcry_cipher_hd_t handle_; #else AES_KEY aes_key_; - u_int8_t ecount_buf[AES_BLOCK_SIZE]; + u_int8_t ecount_buf_[AES_BLOCK_SIZE]; #endif key_derivation_aesctr_ctr_t ctr_; }; diff --git a/src/options.c b/src/options.c index 4f97bfe..4b8dc33 100644 --- a/src/options.c +++ b/src/options.c @@ -312,7 +312,6 @@ void options_print_usage() { printf("USAGE:\n"); printf("uanytun [-h|--help] prints this...\n"); -// printf(" [-f|--config] <file> the config file\n"); printf(" [-D|--nodaemonize] don't run in background\n"); printf(" [-C|--chroot] chroot and drop privileges\n"); printf(" [-u|--username] <username> if chroot change to this user\n"); @@ -336,7 +335,7 @@ void options_print_usage() printf(" [-k|--kd-prf] <kd-prf type> key derivation pseudo random function\n"); printf(" [-l|--ld-kdr] <ld-kdr> log2 of key derivation rate\n"); #ifndef NO_PASSPHRASE - printf(" [-E|--passphrase <pass phrase> a passprhase to generate master key and salt from\n"); + printf(" [-E|--passphrase] <pass phrase> a passprhase to generate master key and salt from\n"); #endif printf(" [-K|--key] <master key> master key to use for encryption\n"); printf(" [-A|--salt] <master salt> master salt to use for encryption\n"); diff --git a/src/uanytun.c b/src/uanytun.c index df54c57..c4a4f1b 100644 --- a/src/uanytun.c +++ b/src/uanytun.c @@ -149,9 +149,9 @@ int process_tun_data(tun_device_t* dev, udp_socket_t* sock, options_t* opt, plai plain_packet_set_payload_length(plain_packet, len); - if(dev->type_ = TYPE_TUN) + if(dev->type_ == TYPE_TUN) plain_packet_set_type(plain_packet, PAYLOAD_TYPE_TUN); - else if(dev->type_ = TYPE_TAP) + else if(dev->type_ == TYPE_TAP) plain_packet_set_type(plain_packet, PAYLOAD_TYPE_TAP); else plain_packet_set_type(plain_packet, PAYLOAD_TYPE_UNKNOWN); |