FreeBSD Bugzilla – Attachment 197973 Details for
Bug 232117
irc/epic5: Fix OpenSSL 1.1.x build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenSSL 1.1.x build
epic5 (text/plain), 3.70 KB, created by
Nathan
on 2018-10-09 20:54:46 UTC
(
hide
)
Description:
Fix OpenSSL 1.1.x build
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-10-09 20:54:46 UTC
Size:
3.70 KB
patch
obsolete
>Index: irc/epic5/Makefile >=================================================================== >--- irc/epic5/Makefile (revision 481499) >+++ irc/epic5/Makefile (working copy) >@@ -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/ > >Index: irc/epic5/files/patch-source_crypto.c >=================================================================== >--- irc/epic5/files/patch-source_crypto.c (nonexistent) >+++ irc/epic5/files/patch-source_crypto.c (working copy) >@@ -0,0 +1,75 @@ >+--- source/crypto.c.orig 2016-08-05 20:49:07 UTC >++++ source/crypto.c >+@@ -282,9 +282,9 @@ 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 *a = EVP_CIPHER_CTX_new(); >++ EVP_CIPHER_CTX_init(a); >++ EVP_CIPHER_CTX_set_padding(a, 0); >+ >+ if (ivsize > 0) >+ iv = new_malloc(ivsize); >+@@ -292,18 +292,19 @@ static char * decipher_evp (const unsigned char *passw >+ 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(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); >+ >+- if (EVP_DecryptUpdate(&a, outbuf, outlen, ciphertext, cipherlen) != 1) >++ if (EVP_DecryptUpdate(a, outbuf, outlen, ciphertext, cipherlen) != 1) >+ yell("EVP_DecryptUpdate died."); >+- if (EVP_DecryptFinal_ex(&a, outbuf + (*outlen), &outlen2) != 1) >++ if (EVP_DecryptFinal_ex(a, outbuf + (*outlen), &outlen2) != 1) >+ yell("EVP_DecryptFinal_Ex died."); >+ *outlen += outlen2; >+ >+- EVP_CIPHER_CTX_cleanup(&a); >++ EVP_CIPHER_CTX_cleanup(a); >++ EVP_CIPHER_CTX_free(a); >+ >+ ERR_load_crypto_strings(); >+ while ((errcode = ERR_get_error())) >+@@ -454,9 +455,9 @@ 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 *a = EVP_CIPHER_CTX_new(); >++ EVP_CIPHER_CTX_init(a); >++ EVP_CIPHER_CTX_set_padding(a, 0); >+ >+ if (ivsize < 0) >+ ivsize = 0; /* Shenanigans! */ >+@@ -480,12 +481,13 @@ 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(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_CIPHER_CTX_free(a); >+ outlen += extralen; >+ >+ ERR_load_crypto_strings(); > >Property changes on: irc/epic5/files/patch-source_crypto.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232117
:
197964
| 197973