Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/epic5/, net-irc/epic5/files/
Date: Sat, 26 Jan 2019 16:36:40
Message-Id: 1548520580.c76d64f8cf1e2ea30b50ee3d3aa9f3d895c9b5ca.pacho@gentoo
1 commit: c76d64f8cf1e2ea30b50ee3d3aa9f3d895c9b5ca
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 26 16:36:02 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 26 16:36:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c76d64f8
7
8 net-irc/epic5: Debian patch for openssl-1.1
9
10 Closes: https://bugs.gentoo.org/676286
11 Package-Manager: Portage-2.3.58, Repoman-2.3.12
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13
14 net-irc/epic5/epic5-2.0.1.ebuild | 5 ++
15 net-irc/epic5/files/epic5-2.0.1-openssl-1.1.patch | 77 +++++++++++++++++++++++
16 2 files changed, 82 insertions(+)
17
18 diff --git a/net-irc/epic5/epic5-2.0.1.ebuild b/net-irc/epic5/epic5-2.0.1.ebuild
19 index ac3c4b0060a..e5ebd880946 100644
20 --- a/net-irc/epic5/epic5-2.0.1.ebuild
21 +++ b/net-irc/epic5/epic5-2.0.1.ebuild
22 @@ -33,6 +33,11 @@ DEPEND="${RDEPEND}
23
24 S="${WORKDIR}/${P}"
25
26 +PATCHES=(
27 + # From Debian
28 + "${FILESDIR}/${P}-openssl-1.1.patch"
29 +)
30 +
31 src_configure() {
32 # Because of our REQUIRED_USE constraints above, we know that
33 # ruby_get_use_implementations will only ever return one ruby
34
35 diff --git a/net-irc/epic5/files/epic5-2.0.1-openssl-1.1.patch b/net-irc/epic5/files/epic5-2.0.1-openssl-1.1.patch
36 new file mode 100644
37 index 00000000000..254035e6d38
38 --- /dev/null
39 +++ b/net-irc/epic5/files/epic5-2.0.1-openssl-1.1.patch
40 @@ -0,0 +1,77 @@
41 +Index: epic5-2.0/source/crypto.c
42 +===================================================================
43 +--- epic5-2.0.orig/source/crypto.c
44 ++++ epic5-2.0/source/crypto.c
45 +@@ -282,9 +282,9 @@ static char * decipher_evp (const unsign
46 + unsigned char *iv = NULL;
47 + unsigned long errcode;
48 + int outlen2;
49 +- EVP_CIPHER_CTX a;
50 +- EVP_CIPHER_CTX_init(&a);
51 +- EVP_CIPHER_CTX_set_padding(&a, 0);
52 ++ EVP_CIPHER_CTX *a = EVP_CIPHER_CTX_new();
53 ++ EVP_CIPHER_CTX_init(a);
54 ++ EVP_CIPHER_CTX_set_padding(a, 0);
55 +
56 + if (ivsize > 0)
57 + iv = new_malloc(ivsize);
58 +@@ -292,18 +292,19 @@ static char * decipher_evp (const unsign
59 + if (ivsize > 0)
60 + memcpy(iv, ciphertext, ivsize);
61 +
62 +- EVP_DecryptInit_ex(&a, type, NULL, NULL, iv);
63 +- EVP_CIPHER_CTX_set_key_length(&a, passwdlen);
64 +- EVP_CIPHER_CTX_set_padding(&a, 0);
65 +- EVP_DecryptInit_ex(&a, NULL, NULL, passwd, NULL);
66 ++ EVP_DecryptInit_ex(a, type, NULL, NULL, iv);
67 ++ EVP_CIPHER_CTX_set_key_length(a, passwdlen);
68 ++ EVP_CIPHER_CTX_set_padding(a, 0);
69 ++ EVP_DecryptInit_ex(a, NULL, NULL, passwd, NULL);
70 +
71 +- if (EVP_DecryptUpdate(&a, outbuf, outlen, ciphertext, cipherlen) != 1)
72 ++ if (EVP_DecryptUpdate(a, outbuf, outlen, ciphertext, cipherlen) != 1)
73 + yell("EVP_DecryptUpdate died.");
74 +- if (EVP_DecryptFinal_ex(&a, outbuf + (*outlen), &outlen2) != 1)
75 ++ if (EVP_DecryptFinal_ex(a, outbuf + (*outlen), &outlen2) != 1)
76 + yell("EVP_DecryptFinal_Ex died.");
77 + *outlen += outlen2;
78 +
79 +- EVP_CIPHER_CTX_cleanup(&a);
80 ++ EVP_CIPHER_CTX_cleanup(a);
81 ++ EVP_CIPHER_CTX_free(a);
82 +
83 + ERR_load_crypto_strings();
84 + while ((errcode = ERR_get_error()))
85 +@@ -454,9 +455,9 @@ static char * cipher_evp (const unsigned
86 + unsigned long errcode;
87 + u_32int_t randomval;
88 + int iv_count;
89 +- EVP_CIPHER_CTX a;
90 +- EVP_CIPHER_CTX_init(&a);
91 +- EVP_CIPHER_CTX_set_padding(&a, 0);
92 ++ EVP_CIPHER_CTX *a = EVP_CIPHER_CTX_new();
93 ++ EVP_CIPHER_CTX_init(a);
94 ++ EVP_CIPHER_CTX_set_padding(a, 0);
95 +
96 + if (ivsize < 0)
97 + ivsize = 0; /* Shenanigans! */
98 +@@ -480,12 +481,13 @@ static char * cipher_evp (const unsigned
99 + if (iv)
100 + memcpy(outbuf, iv, ivsize);
101 +
102 +- EVP_EncryptInit_ex(&a, type, NULL, NULL, iv);
103 +- EVP_CIPHER_CTX_set_key_length(&a, passwdlen);
104 +- EVP_EncryptInit_ex(&a, NULL, NULL, passwd, NULL);
105 +- EVP_EncryptUpdate(&a, outbuf + ivsize, &outlen, plaintext, plaintextlen);
106 +- EVP_EncryptFinal_ex(&a, outbuf + ivsize + outlen, &extralen);
107 +- EVP_CIPHER_CTX_cleanup(&a);
108 ++ EVP_EncryptInit_ex(a, type, NULL, NULL, iv);
109 ++ EVP_CIPHER_CTX_set_key_length(a, passwdlen);
110 ++ EVP_EncryptInit_ex(a, NULL, NULL, passwd, NULL);
111 ++ EVP_EncryptUpdate(a, outbuf + ivsize, &outlen, plaintext, plaintextlen);
112 ++ EVP_EncryptFinal_ex(a, outbuf + ivsize + outlen, &extralen);
113 ++ EVP_CIPHER_CTX_cleanup(a);
114 ++ EVP_CIPHER_CTX_free(a);
115 + outlen += extralen;
116 +
117 + ERR_load_crypto_strings();