diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-07-14 11:04:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-07-14 11:04:34 +0100 |
commit | dd762ff83c330186ee2ede002e08b2f780cddd51 (patch) | |
tree | 63198edcc3ad5df8e2566c28ff9bd8af50cc2174 /net-vpn/vtun | |
parent | 51af5f0eb4cddbe6aa7953717873691d77aae9ff (diff) |
gentoo resync : 14.07.2019
Diffstat (limited to 'net-vpn/vtun')
-rw-r--r-- | net-vpn/vtun/Manifest | 2 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun-libssl-1.1.patch | 229 | ||||
-rw-r--r-- | net-vpn/vtun/vtun-3.0.3-r1.ebuild | 59 |
3 files changed, 290 insertions, 0 deletions
diff --git a/net-vpn/vtun/Manifest b/net-vpn/vtun/Manifest index 74ebd11eff18..d8bf224071dc 100644 --- a/net-vpn/vtun/Manifest +++ b/net-vpn/vtun/Manifest @@ -1,8 +1,10 @@ AUX vtun-3.0.2-remove-config-presence-check.patch 513 BLAKE2B 7a29b772a9ab673a8711d5dc54881d1d53ea25fc379f8d09bb3587bf7269dec79b610c196114f2fa678d4ae903e703c13235d8b39b3436cdc4ea386b8caacd33 SHA512 7e2f0e220801201080bbf256588d30790344aad44603012805bef39748636c2f599796289c6872251d926cc01e96f86203ddb40414e9ec77aac95423d3b8f9f9 AUX vtun-3.0.3-gcc5.patch 468 BLAKE2B 66dd08c600b41ac3c0d65c7068e4b4f404a9ee7aa9f82eb61c7a27f527b83d1e3e0c09f3063cd7de56036654c40e9c8dd23c95db7e372b5ba4d8a5f17e306c1e SHA512 f907812408ec752e3aef9837d2830b908c424628973e4fd0f9e21d12eb42ce6b700f93be6755b3c8a8d03e97d767fdf246157e5a2e0792598aa07bc00e7736b4 AUX vtun-3.0.3-includes.patch 1748 BLAKE2B e7eaea5a995bb24e72abed8c5797cd77b26bca9509ea3548f8313007c6019f83b61f00db9f8a7631aef3f355c030e6b7960b679d28c6705f60fb458368ce69d0 SHA512 4d6e1f80a9a5ed747f1c20f3fc0b12cf3093781ca01c9b9200f59da83139fdc09a7fe972358965ad3547103e3be143f26afa92d58f6224eaf0f570d3bfa85cc6 +AUX vtun-libssl-1.1.patch 7826 BLAKE2B 6c025f0aef6ea16e7cde078637f4f3ed908b54a6df5582296c30700891e9bcbf154e07d6eea817eb61ace072b5b24cebb619cb16b3f4acbee33a634915f36b3d SHA512 13f549893a6ef6469578fa985cfd0d9a1758b14b2a3b03aae8fff8f1b43ae022c5890b4fd71d790c3edbb96882ab38bd9bf62b64b13114c6fbb5f5e2245b3a79 AUX vtun.rc 669 BLAKE2B beb4f78d4a4c8a83ea7d102a9c508125cf0942081aebeb0d6196fa8a04a5095f6a50f514ef46debc82da19d548cccd4e90cf6f7dece51158428c037d1064ace7 SHA512 d5028e1ca0b01e9f746b273a54f9c82bdf393c22c4ba099b08fadec5086055c571242d6d1c13eeced9d8c7c27bc57a7559a91f05f8e25ff92a6629827d443ee4 AUX vtund-start.conf 1174 BLAKE2B 3bce3aa808286c554accb71876314bbe8ecbd5e02b16b804f911201a0fbfd8fae25f9f6a702d2de4ef5254d50661d9d1c578f5d6b7e9dcec5b92ebe8b4724007 SHA512 7ec2a8f64380483b8e311bbefb78675a457e27088888e654f8c5fee5f14a77a72f1319b9c7e2dd38763c86728e4f44d6eb87c286103e547e19f329f1550e6710 DIST vtun-3.0.3.tar.gz 130051 BLAKE2B 9bbc11724fb75acd024fda8b4e84af425c5377b3d8a938f7e789ecb1c2cdb95f109a1edc59f3fcbd2c5898bd17be76054060e8e36a1fb4355b40b61cc64adaad SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54 +EBUILD vtun-3.0.3-r1.ebuild 1536 BLAKE2B d1f4b8066c339799b9104d70b0e40e3686bb4a35c85b75678ce3c4a089510b94e27c1b0723c5ba84500601dc838148b51b7a51177f9fee317d107773e08631cc SHA512 7fc8d100a3945feb8e060b8b91bfeaa32c063fd058477cce0257e1b6b28cc7569f3bb4445465d4f23178f5275deab169710c7e6edf5c7b9fedfc9f6e87cb318c EBUILD vtun-3.0.3.ebuild 1450 BLAKE2B 50212549f2a46310ca4cd7160d65a6efaf1a5648a6005c0783821c3be15f459d5a77d377815b2a53df3447f44482e1746acdaac4fea2dbdb992b695fe93c3285 SHA512 cfee3847a8925c5d37b6273896e759fc8cbd49302c31870d6124fe51d70b91d1d9414453c99345b09c6a308b6cde9151e8426d6524358d0ebb962b45260173a1 MISC metadata.xml 321 BLAKE2B bc9b56ffe1106a5ba954a206111d3814e33cca82f2431c888f7c5da8c7b8314e3fcda78c6f96791cc33b6710ff8eb07ba38c14582e2f5a070ae10442d0ea03d0 SHA512 c5983cd105c9b0534371fae20648dc22d4d73440d2f1df3fdab3c84dc76d58fc951c31421cf9ac597fdef0067a53fcb54817a4a0c40b6cbf8c4dcfae8543c731 diff --git a/net-vpn/vtun/files/vtun-libssl-1.1.patch b/net-vpn/vtun/files/vtun-libssl-1.1.patch new file mode 100644 index 000000000000..76a3c027d889 --- /dev/null +++ b/net-vpn/vtun/files/vtun-libssl-1.1.patch @@ -0,0 +1,229 @@ +--- vtun-3.0.3/lfd_encrypt.c.orig 2019-02-25 18:43:39.310480427 -0500
++++ vtun-3.0.3/lfd_encrypt.c 2019-02-25 18:55:26.956441285 -0500
+@@ -96,11 +96,11 @@
+ char * pkey;
+ char * iv_buf;
+
+-EVP_CIPHER_CTX ctx_enc; /* encrypt */
+-EVP_CIPHER_CTX ctx_dec; /* decrypt */
++EVP_CIPHER_CTX *ctx_enc; /* encrypt */
++EVP_CIPHER_CTX *ctx_dec; /* decrypt */
+
+-EVP_CIPHER_CTX ctx_enc_ecb; /* sideband ecb encrypt */
+-EVP_CIPHER_CTX ctx_dec_ecb; /* sideband ecb decrypt */
++EVP_CIPHER_CTX *ctx_enc_ecb; /* sideband ecb encrypt */
++EVP_CIPHER_CTX *ctx_dec_ecb; /* sideband ecb decrypt */
+
+ int prep_key(char **key, int size, struct vtun_host *host)
+ {
+@@ -152,6 +152,11 @@
+ EVP_CIPHER_CTX *pctx_enc;
+ EVP_CIPHER_CTX *pctx_dec;
+
++ ctx_enc = EVP_CIPHER_CTX_new();
++ ctx_dec = EVP_CIPHER_CTX_new();
++ ctx_enc_ecb = EVP_CIPHER_CTX_new();
++ ctx_dec_ecb = EVP_CIPHER_CTX_new();
++
+ enc_init_first_time = 1;
+ dec_init_first_time = 1;
+
+@@ -178,15 +183,15 @@
+ keysize = 32;
+ sb_init = 1;
+ cipher_type = EVP_aes_256_ecb();
+- pctx_enc = &ctx_enc_ecb;
+- pctx_dec = &ctx_dec_ecb;
++ pctx_enc = ctx_enc_ecb;
++ pctx_dec = ctx_dec_ecb;
+ break;
+
+ case VTUN_ENC_AES256ECB:
+ blocksize = 16;
+ keysize = 32;
+- pctx_enc = &ctx_enc;
+- pctx_dec = &ctx_dec;
++ pctx_enc = ctx_enc;
++ pctx_dec = ctx_dec;
+ cipher_type = EVP_aes_256_ecb();
+ strcpy(cipher_name,"AES-256-ECB");
+ break;
+@@ -197,14 +202,14 @@
+ keysize = 16;
+ sb_init=1;
+ cipher_type = EVP_aes_128_ecb();
+- pctx_enc = &ctx_enc_ecb;
+- pctx_dec = &ctx_dec_ecb;
++ pctx_enc = ctx_enc_ecb;
++ pctx_dec = ctx_dec_ecb;
+ break;
+ case VTUN_ENC_AES128ECB:
+ blocksize = 16;
+ keysize = 16;
+- pctx_enc = &ctx_enc;
+- pctx_dec = &ctx_dec;
++ pctx_enc = ctx_enc;
++ pctx_dec = ctx_dec;
+ cipher_type = EVP_aes_128_ecb();
+ strcpy(cipher_name,"AES-128-ECB");
+ break;
+@@ -217,16 +222,16 @@
+ var_key = 1;
+ sb_init = 1;
+ cipher_type = EVP_bf_ecb();
+- pctx_enc = &ctx_enc_ecb;
+- pctx_dec = &ctx_dec_ecb;
++ pctx_enc = ctx_enc_ecb;
++ pctx_dec = ctx_dec_ecb;
+ break;
+
+ case VTUN_ENC_BF256ECB:
+ blocksize = 8;
+ keysize = 32;
+ var_key = 1;
+- pctx_enc = &ctx_enc;
+- pctx_dec = &ctx_dec;
++ pctx_enc = ctx_enc;
++ pctx_dec = ctx_dec;
+ cipher_type = EVP_bf_ecb();
+ strcpy(cipher_name,"Blowfish-256-ECB");
+ break;
+@@ -239,16 +244,16 @@
+ var_key = 1;
+ sb_init = 1;
+ cipher_type = EVP_bf_ecb();
+- pctx_enc = &ctx_enc_ecb;
+- pctx_dec = &ctx_dec_ecb;
++ pctx_enc = ctx_enc_ecb;
++ pctx_dec = ctx_dec_ecb;
+ break;
+ case VTUN_ENC_BF128ECB: /* blowfish 128 ecb is the default */
+ default:
+ blocksize = 8;
+ keysize = 16;
+ var_key = 1;
+- pctx_enc = &ctx_enc;
+- pctx_dec = &ctx_dec;
++ pctx_enc = ctx_enc;
++ pctx_dec = ctx_dec;
+ cipher_type = EVP_bf_ecb();
+ strcpy(cipher_name,"Blowfish-128-ECB");
+ break;
+@@ -290,10 +295,10 @@
+ lfd_free(enc_buf); enc_buf = NULL;
+ lfd_free(dec_buf); dec_buf = NULL;
+
+- EVP_CIPHER_CTX_cleanup(&ctx_enc);
+- EVP_CIPHER_CTX_cleanup(&ctx_dec);
+- EVP_CIPHER_CTX_cleanup(&ctx_enc_ecb);
+- EVP_CIPHER_CTX_cleanup(&ctx_dec_ecb);
++ EVP_CIPHER_CTX_free(ctx_enc);
++ EVP_CIPHER_CTX_free(ctx_dec);
++ EVP_CIPHER_CTX_free(ctx_enc_ecb);
++ EVP_CIPHER_CTX_free(ctx_dec_ecb);
+
+ return 0;
+ }
+@@ -319,7 +324,7 @@
+ outlen=len+pad;
+ if (pad == blocksize)
+ RAND_bytes(in_ptr+len, blocksize-1);
+- EVP_EncryptUpdate(&ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
++ EVP_EncryptUpdate(ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
+ *out = enc_buf;
+
+ sequence_num++;
+@@ -339,7 +344,7 @@
+
+ outlen=len;
+ if (!len) return 0;
+- EVP_DecryptUpdate(&ctx_dec, out_ptr, &outlen, in_ptr, len);
++ EVP_DecryptUpdate(ctx_dec, out_ptr, &outlen, in_ptr, len);
+ recv_ib_mesg(&outlen, &out_ptr);
+ if (!outlen) return 0;
+ tmp_ptr = out_ptr + outlen; tmp_ptr--;
+@@ -427,13 +432,13 @@
+ break;
+ } /* switch(cipher) */
+
+- EVP_CIPHER_CTX_init(&ctx_enc);
+- EVP_EncryptInit_ex(&ctx_enc, cipher_type, NULL, NULL, NULL);
++ EVP_CIPHER_CTX_init(ctx_enc);
++ EVP_EncryptInit_ex(ctx_enc, cipher_type, NULL, NULL, NULL);
+ if (var_key)
+- EVP_CIPHER_CTX_set_key_length(&ctx_enc, keysize);
+- EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, pkey, NULL);
+- EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, NULL, iv);
+- EVP_CIPHER_CTX_set_padding(&ctx_enc, 0);
++ EVP_CIPHER_CTX_set_key_length(ctx_enc, keysize);
++ EVP_EncryptInit_ex(ctx_enc, NULL, NULL, pkey, NULL);
++ EVP_EncryptInit_ex(ctx_enc, NULL, NULL, NULL, iv);
++ EVP_CIPHER_CTX_set_padding(ctx_enc, 0);
+ if (enc_init_first_time)
+ {
+ sprintf(tmpstr,"%s encryption initialized", cipher_name);
+@@ -517,13 +522,13 @@
+ break;
+ } /* switch(cipher) */
+
+- EVP_CIPHER_CTX_init(&ctx_dec);
+- EVP_DecryptInit_ex(&ctx_dec, cipher_type, NULL, NULL, NULL);
++ EVP_CIPHER_CTX_init(ctx_dec);
++ EVP_DecryptInit_ex(ctx_dec, cipher_type, NULL, NULL, NULL);
+ if (var_key)
+- EVP_CIPHER_CTX_set_key_length(&ctx_dec, keysize);
+- EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, pkey, NULL);
+- EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, NULL, iv);
+- EVP_CIPHER_CTX_set_padding(&ctx_dec, 0);
++ EVP_CIPHER_CTX_set_key_length(ctx_dec, keysize);
++ EVP_DecryptInit_ex(ctx_dec, NULL, NULL, pkey, NULL);
++ EVP_DecryptInit_ex(ctx_dec, NULL, NULL, NULL, iv);
++ EVP_CIPHER_CTX_set_padding(ctx_dec, 0);
+ if (dec_init_first_time)
+ {
+ sprintf(tmpstr,"%s decryption initialized", cipher_name);
+@@ -555,7 +560,7 @@
+
+ in_ptr = in - blocksize*2;
+ outlen = blocksize*2;
+- EVP_EncryptUpdate(&ctx_enc_ecb, in_ptr,
++ EVP_EncryptUpdate(ctx_enc_ecb, in_ptr,
+ &outlen, in_ptr, blocksize*2);
+ *out = in_ptr;
+ len = outlen;
+@@ -582,7 +587,7 @@
+ in_ptr = in;
+ iv = malloc(blocksize);
+ outlen = blocksize*2;
+- EVP_DecryptUpdate(&ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
++ EVP_DecryptUpdate(ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
+
+ if ( !strncmp(in_ptr, "ivec", 4) )
+ {
+@@ -625,7 +630,7 @@
+ if (cipher_enc_state != CIPHER_INIT)
+ {
+ cipher_enc_state = CIPHER_INIT;
+- EVP_CIPHER_CTX_cleanup(&ctx_enc);
++ EVP_CIPHER_CTX_cleanup(ctx_enc);
+ #ifdef LFD_ENCRYPT_DEBUG
+ vtun_syslog(LOG_INFO,
+ "Forcing local encryptor re-init");
+@@ -706,7 +711,7 @@
+ if (cipher_enc_state != CIPHER_INIT)
+ {
+ cipher_enc_state = CIPHER_INIT;
+- EVP_CIPHER_CTX_cleanup(&ctx_enc);
++ EVP_CIPHER_CTX_cleanup(ctx_enc);
+ }
+ #ifdef LFD_ENCRYPT_DEBUG
+ vtun_syslog(LOG_INFO, "Remote requests encryptor re-init");
+@@ -720,7 +725,7 @@
+ cipher_enc_state != CIPHER_REQ_INIT &&
+ cipher_enc_state != CIPHER_INIT)
+ {
+- EVP_CIPHER_CTX_cleanup (&ctx_dec);
++ EVP_CIPHER_CTX_cleanup (ctx_dec);
+ cipher_dec_state = CIPHER_INIT;
+ cipher_enc_state = CIPHER_REQ_INIT;
+ }
diff --git a/net-vpn/vtun/vtun-3.0.3-r1.ebuild b/net-vpn/vtun/vtun-3.0.3-r1.ebuild new file mode 100644 index 000000000000..d56bcd52fbdb --- /dev/null +++ b/net-vpn/vtun/vtun-3.0.3-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info + +DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +HOMEPAGE="http://vtun.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="lzo socks5 ssl zlib" + +RDEPEND="ssl? ( dev-libs/openssl:0 ) + lzo? ( dev-libs/lzo:2 ) + zlib? ( sys-libs/zlib ) + socks5? ( net-proxy/dante )" +DEPEND="${RDEPEND} + sys-devel/bison" + +DOCS="ChangeLog Credits FAQ README README.Setup README.Shaper TODO" + +CONFIG_CHECK="~TUN" + +src_prepare() { + sed -i Makefile.in \ + -e '/^LDFLAGS/s|=|+=|g' \ + || die "sed Makefile" + eapply "${FILESDIR}"/${P}-includes.patch + # remove unneeded checking for /etc/vtund.conf + eapply -p0 "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch + # GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164 + eapply "${FILESDIR}"/${P}-gcc5.patch + # openssl 1.1 compatibility, bug 674280 + eapply -l "${FILESDIR}"/${PN}-libssl-1.1.patch + # portage takes care about striping binaries itself + sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die + + eapply_user +} + +src_configure() { + econf \ + $(use_enable ssl) \ + $(use_enable zlib) \ + $(use_enable lzo) \ + $(use_enable socks5 socks) \ + --enable-shaper +} + +src_install() { + default + newinitd "${FILESDIR}"/vtun.rc vtun + insinto etc + doins "${FILESDIR}"/vtund-start.conf +} |