Skip to content

Commit

Permalink
Remove utterly broken and already deprecated legacy VTUN encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Denis committed Oct 8, 2015
1 parent 4270256 commit 116ee62
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 168 deletions.
13 changes: 2 additions & 11 deletions auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,7 @@ static char *bf2cf(struct vtun_host *host)
*(ptr++) = 'K';

if( host->flags & VTUN_ENCRYPT ) {
if (host->cipher == VTUN_LEGACY_ENCRYPT) { /* use old flag method */
ptr += sprintf(ptr,"E");
} else {
ptr += sprintf(ptr,"E%d", host->cipher);
}
ptr += sprintf(ptr,"E%d", host->cipher);
}

strcat(ptr,">");
Expand Down Expand Up @@ -242,12 +238,7 @@ static int cf2bf(char *str, struct vtun_host *host)
return 0;
}
host->flags |= VTUN_ENCRYPT;
if (0 == s) {
host->cipher = VTUN_LEGACY_ENCRYPT;
vtun_syslog(LOG_INFO,"Remote server using older encryption.");
} else {
host->cipher = s;
}
host->cipher = s;
ptr = p;
break;
case 'S':
Expand Down
1 change: 0 additions & 1 deletion cfg_kwords.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ struct kword cfg_param[] = {
{ "inetd", VTUN_INETD },
{ "stand", VTUN_STAND_ALONE },
{ "keep", VTUN_PERSIST_KEEPIF },
{ "oldblowfish128ecb", VTUN_LEGACY_ENCRYPT },
{ "blowfish128ecb", VTUN_ENC_BF128ECB },
{ "blowfish128cbc", VTUN_ENC_BF128CBC },
{ "blowfish128cfb", VTUN_ENC_BF128CFB },
Expand Down
149 changes: 0 additions & 149 deletions lfd_legacy_encrypt.c

This file was deleted.

6 changes: 1 addition & 5 deletions linkfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,8 @@ int linkfd(struct vtun_host *host)
lfd_add_mod(&lfd_lzo);

if(host->flags & VTUN_ENCRYPT)
if(host->cipher == VTUN_LEGACY_ENCRYPT) {
lfd_add_mod(&lfd_legacy_encrypt);
} else {
lfd_add_mod(&lfd_encrypt);
}


if(host->flags & VTUN_SHAPE)
lfd_add_mod(&lfd_shaper);

Expand Down
2 changes: 0 additions & 2 deletions vtun.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ extern llist host_list;
#define VTUN_ENC_AES256CFB 15
#define VTUN_ENC_AES256OFB 16

#define VTUN_LEGACY_ENCRYPT 999

/* Mask to drop the flags which will be supplied by the server */
#define VTUN_CLNT_MASK 0xf000

Expand Down

0 comments on commit 116ee62

Please sign in to comment.