svn commit: r486014 - in head/irc/epic5: . files
Josh Paetzel
jpaetzel at FreeBSD.org
Tue Nov 27 15:34:26 UTC 2018
Author: jpaetzel
Date: Tue Nov 27 15:34:24 2018
New Revision: 486014
URL: https://svnweb.freebsd.org/changeset/ports/486014
Log:
Fix build with OpenSSL version 1.1.1
The fix for this has been in the epic5 git repo for some
time now, looks like it's time for them to roll a release.
Maintainer timeout
PR: 232117
Added:
head/irc/epic5/files/
head/irc/epic5/files/patch-source_crypto.c (contents, props changed)
Modified:
head/irc/epic5/Makefile
Modified: head/irc/epic5/Makefile
==============================================================================
--- head/irc/epic5/Makefile Tue Nov 27 14:58:16 2018 (r486013)
+++ head/irc/epic5/Makefile Tue Nov 27 15:34:24 2018 (r486014)
@@ -3,6 +3,7 @@
PORTNAME= epic5
PORTVERSION= 2.0.1
+PORTREVISION= 1
CATEGORIES= irc ipv6
MASTER_SITES= http://ftp.epicsol.org/pub/epic/EPIC5-PRODUCTION/
Added: head/irc/epic5/files/patch-source_crypto.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/irc/epic5/files/patch-source_crypto.c Tue Nov 27 15:34:24 2018 (r486014)
@@ -0,0 +1,84 @@
+--- source/crypto.c.orig 2016-08-05 20:49:07 UTC
++++ source/crypto.c
+@@ -282,28 +282,33 @@ static char * decipher_evp (const unsigned char *passw
+ unsigned char *iv = NULL;
+ unsigned long errcode;
+ int outlen2;
+- EVP_CIPHER_CTX a;
+- EVP_CIPHER_CTX_init(&a);
+- EVP_CIPHER_CTX_set_padding(&a, 0);
++ EVP_CIPHER_CTX *context = EVP_CIPHER_CTX_new();
+
++ if(context == NULL) {
++ yell("ERROR: Could not generate cipher context");
++ return NULL;
++ }
++
++ EVP_CIPHER_CTX_set_padding(context, 0);
++
+ if (ivsize > 0)
+ iv = new_malloc(ivsize);
+ outbuf = new_malloc(cipherlen + 1024);
+ if (ivsize > 0)
+ memcpy(iv, ciphertext, ivsize);
+
+- EVP_DecryptInit_ex(&a, type, NULL, NULL, iv);
+- EVP_CIPHER_CTX_set_key_length(&a, passwdlen);
+- EVP_CIPHER_CTX_set_padding(&a, 0);
+- EVP_DecryptInit_ex(&a, NULL, NULL, passwd, NULL);
++ EVP_DecryptInit_ex(context, type, NULL, NULL, iv);
++ EVP_CIPHER_CTX_set_key_length(context, passwdlen);
++ EVP_CIPHER_CTX_set_padding(context, 0);
++ EVP_DecryptInit_ex(context, NULL, NULL, passwd, NULL);
+
+- if (EVP_DecryptUpdate(&a, outbuf, outlen, ciphertext, cipherlen) != 1)
++ if (EVP_DecryptUpdate(context, outbuf, outlen, ciphertext, cipherlen) != 1)
+ yell("EVP_DecryptUpdate died.");
+- if (EVP_DecryptFinal_ex(&a, outbuf + (*outlen), &outlen2) != 1)
++ if (EVP_DecryptFinal_ex(context, outbuf + (*outlen), &outlen2) != 1)
+ yell("EVP_DecryptFinal_Ex died.");
+ *outlen += outlen2;
+
+- EVP_CIPHER_CTX_cleanup(&a);
++ EVP_CIPHER_CTX_free(context);
+
+ ERR_load_crypto_strings();
+ while ((errcode = ERR_get_error()))
+@@ -454,10 +459,15 @@ static char * cipher_evp (const unsigned char *passwd,
+ unsigned long errcode;
+ u_32int_t randomval;
+ int iv_count;
+- EVP_CIPHER_CTX a;
+- EVP_CIPHER_CTX_init(&a);
+- EVP_CIPHER_CTX_set_padding(&a, 0);
++ EVP_CIPHER_CTX *context = EVP_CIPHER_CTX_new();
+
++ if(context == NULL) {
++ yell("ERROR: Could not generate cipher context");
++ return NULL;
++ }
++
++ EVP_CIPHER_CTX_set_padding(context, 0);
++
+ if (ivsize < 0)
+ ivsize = 0; /* Shenanigans! */
+
+@@ -480,12 +490,12 @@ static char * cipher_evp (const unsigned char *passwd,
+ if (iv)
+ memcpy(outbuf, iv, ivsize);
+
+- EVP_EncryptInit_ex(&a, type, NULL, NULL, iv);
+- EVP_CIPHER_CTX_set_key_length(&a, passwdlen);
+- EVP_EncryptInit_ex(&a, NULL, NULL, passwd, NULL);
+- EVP_EncryptUpdate(&a, outbuf + ivsize, &outlen, plaintext, plaintextlen);
+- EVP_EncryptFinal_ex(&a, outbuf + ivsize + outlen, &extralen);
+- EVP_CIPHER_CTX_cleanup(&a);
++ EVP_EncryptInit_ex(context, type, NULL, NULL, iv);
++ EVP_CIPHER_CTX_set_key_length(context, passwdlen);
++ EVP_EncryptInit_ex(context, NULL, NULL, passwd, NULL);
++ EVP_EncryptUpdate(context, outbuf + ivsize, &outlen, plaintext, plaintextlen);
++ EVP_EncryptFinal_ex(context, outbuf + ivsize + outlen, &extralen);
++ EVP_CIPHER_CTX_free(context);
+ outlen += extralen;
+
+ ERR_load_crypto_strings();
More information about the svn-ports-all
mailing list