[arch-commits] Commit in efl/trunk (3 files)
Jan de Groot
jgc at archlinux.org
Thu Mar 9 12:25:52 UTC 2017
Date: Thursday, March 9, 2017 @ 12:25:51
Author: jgc
Revision: 290199
upgpkg: efl 1.18.4-2
OpenSSL 1.1
Added:
efl/trunk/efl-1.18.2-openssl-1.1.patch
Modified:
efl/trunk/PKGBUILD
Deleted:
efl/trunk/efl-1.10.0-giflib-5.1.0.patch
-------------------------------+
PKGBUILD | 17 +-
efl-1.10.0-giflib-5.1.0.patch | 39 ------
efl-1.18.2-openssl-1.1.patch | 247 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 258 insertions(+), 45 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-09 12:15:11 UTC (rev 290198)
+++ PKGBUILD 2017-03-09 12:25:51 UTC (rev 290199)
@@ -5,10 +5,10 @@
pkgbase=efl
pkgname=('efl' 'efl-docs')
pkgver=1.18.4
-pkgrel=1
+pkgrel=2
pkgdesc="Enlightenment Foundation Libraries"
arch=('i686' 'x86_64')
-url="http://www.enlightenment.org"
+url="https://www.enlightenment.org"
license=('BSD' 'LGPL2.1' 'GPL2' 'custom')
depends=('bullet' 'libjpeg-turbo' 'gst-plugins-base'
'luajit' 'curl' 'fribidi' 'libpulse' 'libxcomposite'
@@ -19,10 +19,13 @@
optdepends=('python2: einabench-cmp' 'libreoffice: thumbnailing for DOC/PPT/XLS files')
makedepends=('doxygen' 'python' 'texlive-core' 'ghostscript' 'imagemagick')
options=('!emptydirs')
-source=(http://download.enlightenment.org/rel/libs/${pkgname}/$pkgname-$pkgver.tar.xz
- 'eina_doxygen.patch')
-sha1sums=('34e7d9ea62da5a539289a0e76af7403b278e5c59'
- 'ef2b961e793c711685623a149ab55b1bec9a3676')
+source=(https://download.enlightenment.org/rel/libs/${pkgname}/$pkgname-$pkgver.tar.xz
+ eina_doxygen.patch
+ efl-1.18.2-openssl-1.1.patch)
+sha256sums=('39ebc07e37437d6ecdeb0f645783484e28a882b38f7e619ad12c2bf9b5548025'
+ '2a83b636a4e897ea9445b42de98dbf8514a920c3765648b0c27f7366ad95cb87'
+ 'fa8e9d0b4f8ec36a40354f2c7c3e2bef055ab7301317437e3a6c5fd01152e9c3')
+
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed -i 's/env python$/&2/' src/scripts/eina/eina-bench-cmp
@@ -29,6 +32,8 @@
# fix docs building
patch -Np0 -i ${srcdir}/eina_doxygen.patch
+
+ patch -Np1 -i ../efl-1.18.2-openssl-1.1.patch
}
build() {
Deleted: efl-1.10.0-giflib-5.1.0.patch
===================================================================
--- efl-1.10.0-giflib-5.1.0.patch 2017-03-09 12:15:11 UTC (rev 290198)
+++ efl-1.10.0-giflib-5.1.0.patch 2017-03-09 12:25:51 UTC (rev 290199)
@@ -1,39 +0,0 @@
-diff -rupN a/src/modules/evas/loaders/gif/evas_image_load_gif.c b/src/modules/evas/loaders/gif/evas_image_load_gif.c
---- a/src/modules/evas/loaders/gif/evas_image_load_gif.c 2014-05-19 16:10:12.000000000 +0000
-+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c 2014-06-01 11:05:50.963850389 +0000
-@@ -528,7 +528,7 @@ evas_image_load_file_head_gif2(void *loa
- ret = EINA_TRUE;
-
- on_error: // jump here on any errors to clean up
-- if (gif) DGifCloseFile(gif);
-+ if (gif) DGifCloseFile(gif, NULL);
- if (fi.map) eina_file_map_free(f, fi.map);
- return ret;
- }
-@@ -606,7 +606,7 @@ open_file:
- // start as we have nothnig to build on
- if ((index > 0) && (index < loader->imgnum) && (animated->animated))
- {
-- if (loader->gif) DGifCloseFile(loader->gif);
-+ if (loader->gif) DGifCloseFile(loader->gif, NULL);
- if ((loader->fi.map) && (loader->f))
- eina_file_map_free(loader->f, loader->fi.map);
- loader->gif = NULL;
-@@ -764,7 +764,7 @@ open_file:
- loader->imgnum = imgnum;
- if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE))
- {
-- if (loader->gif) DGifCloseFile(loader->gif);
-+ if (loader->gif) DGifCloseFile(loader->gif, NULL);
- if ((loader->fi.map) && (loader->f))
- eina_file_map_free(loader->f, loader->fi.map);
- loader->gif = NULL;
-@@ -848,7 +848,7 @@ static void
- evas_image_load_file_close_gif2(void *loader_data)
- {
- Loader_Info *loader = loader_data;
-- if (loader->gif) DGifCloseFile(loader->gif);
-+ if (loader->gif) DGifCloseFile(loader->gif, NULL);
- if ((loader->fi.map) && (loader->f))
- eina_file_map_free(loader->f, loader->fi.map);
- free(loader);
Added: efl-1.18.2-openssl-1.1.patch
===================================================================
--- efl-1.18.2-openssl-1.1.patch (rev 0)
+++ efl-1.18.2-openssl-1.1.patch 2017-03-09 12:25:51 UTC (rev 290199)
@@ -0,0 +1,247 @@
+diff -up efl-1.18.2/src/lib/eet/eet_cipher.c.fixup efl-1.18.2/src/lib/eet/eet_cipher.c
+--- efl-1.18.2/src/lib/eet/eet_cipher.c.fixup 2016-10-19 10:31:31.601037298 -0400
++++ efl-1.18.2/src/lib/eet/eet_cipher.c 2016-10-19 10:43:13.258515381 -0400
+@@ -475,9 +475,15 @@ eet_identity_sign(FILE *fp,
+ gnutls_datum_t signum = { NULL, 0 };
+ gnutls_privkey_t privkey;
+ # else /* ifdef HAVE_GNUTLS */
+- EVP_MD_CTX md_ctx;
+ unsigned int sign_len = 0;
+ int cert_len = 0;
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
++ if (md_ctx == NULL)
++ return EET_ERROR_BAD_OBJECT;
++# else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
++ EVP_MD_CTX md_ctx;
++# endif /* if OPENSSL_VERSION_NUMBER >= 0x10100000L */
+ # endif /* ifdef HAVE_GNUTLS */
+
+ /* A few check and flush pending write. */
+@@ -560,6 +566,15 @@ eet_identity_sign(FILE *fp,
+ goto on_error;
+ }
+
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ /* Do the signature. */
++ EVP_SignInit(md_ctx, EVP_sha1());
++ EVP_SignUpdate(md_ctx, data, st_buf.st_size);
++ err = EVP_SignFinal(md_ctx,
++ sign,
++ (unsigned int *)&sign_len,
++ key->private_key);
++# else
+ /* Do the signature. */
+ EVP_SignInit(&md_ctx, EVP_sha1());
+ EVP_SignUpdate(&md_ctx, data, st_buf.st_size);
+@@ -567,6 +582,7 @@ eet_identity_sign(FILE *fp,
+ sign,
+ (unsigned int *)&sign_len,
+ key->private_key);
++# endif
+ if (err != 1)
+ {
+ ERR_print_errors_fp(stdout);
+@@ -615,6 +631,9 @@ on_error:
+ # else /* ifdef HAVE_GNUTLS */
+ if (cert)
+ OPENSSL_free(cert);
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_MD_CTX_free(md_ctx);
++# endif /* if OPENSSL_VERSION_NUMBER >= 0x10100000L */
+
+ # endif /* ifdef HAVE_GNUTLS */
+ if (sign)
+@@ -739,7 +758,13 @@ eet_identity_check(const void *data_ba
+ const unsigned char *tmp;
+ EVP_PKEY *pkey;
+ X509 *x509;
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
++ if (md_ctx == NULL)
++ return NULL;
++# else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
+ EVP_MD_CTX md_ctx;
++# endif /* if OPENSSL_VERSION_NUMBER >= 0x10100000L */
+ int err;
+
+ /* Strange but d2i_X509 seems to put 0 all over the place. */
+@@ -757,10 +782,17 @@ eet_identity_check(const void *data_ba
+ return NULL;
+ }
+
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ /* Verify the signature */
++ EVP_VerifyInit(md_ctx, EVP_sha1());
++ EVP_VerifyUpdate(md_ctx, data_base, data_length);
++ err = EVP_VerifyFinal(md_ctx, sign, sign_len, pkey);
++# else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
+ /* Verify the signature */
+ EVP_VerifyInit(&md_ctx, EVP_sha1());
+ EVP_VerifyUpdate(&md_ctx, data_base, data_length);
+ err = EVP_VerifyFinal(&md_ctx, sign, sign_len, pkey);
++# endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
+
+ X509_free(x509);
+ EVP_PKEY_free(pkey);
+@@ -800,6 +832,9 @@ eet_identity_check(const void *data_ba
+ raw_signature_base = NULL;
+ raw_signature_length = NULL;
+ x509_length = NULL;
++# if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_MD_CTX_free(md_ctx);
++# endif /* if OPENSSL_VERSION_NUMBER >= 0x10100000L */
+ return NULL;
+ #endif /* ifdef HAVE_SIGNATURE */
+ }
+diff -up efl-1.18.2/src/lib/emile/emile_cipher_openssl.c.fixup efl-1.18.2/src/lib/emile/emile_cipher_openssl.c
+--- efl-1.18.2/src/lib/emile/emile_cipher_openssl.c.fixup 2016-10-19 10:10:05.735351607 -0400
++++ efl-1.18.2/src/lib/emile/emile_cipher_openssl.c 2016-10-19 10:30:27.529498249 -0400
+@@ -87,7 +87,11 @@ emile_binbuf_cipher(Emile_Cipher_Algorit
+ unsigned int crypted_length;
+ int opened = 0;
+ /* Openssl declarations*/
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_CIPHER_CTX *ctx;
++#else
+ EVP_CIPHER_CTX ctx;
++#endif
+ unsigned int *buffer = NULL;
+ int tmp_len;
+
+@@ -134,17 +138,43 @@ emile_binbuf_cipher(Emile_Cipher_Algorit
+
+ /* Openssl create the corresponding cipher
+ AES with a 256 bit key, Cipher Block Chaining mode */
+- EVP_CIPHER_CTX_init(&ctx);
+- if (!EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL)
++ goto on_error;
++
++ opened = 1;
++
++ if (!EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, ik, iv))
+ goto on_error;
++#else
++ EVP_CIPHER_CTX_init(&ctx);
+
+ opened = 1;
+
++ if (!EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
++ goto on_error;
++#endif
++
+ memset(iv, 0, sizeof (iv));
+ memset(ik, 0, sizeof (ik));
+
+ pointer = (unsigned char*) eina_binbuf_string_get(result);
+
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ /* Openssl encrypt */
++ if (!EVP_EncryptUpdate(ctx, pointer + sizeof (int), &tmp_len,
++ (unsigned char *)buffer,
++ eina_binbuf_length_get(data) + sizeof(unsigned int)))
++ goto on_error;
++
++ /* Openssl close the cipher */
++ if (!EVP_EncryptFinal_ex(ctx, pointer + sizeof (int) + tmp_len,
++ &tmp_len))
++ goto on_error;
++
++ EVP_CIPHER_CTX_free(ctx);
++#else
+ /* Openssl encrypt */
+ if (!EVP_EncryptUpdate(&ctx, pointer + sizeof (int), &tmp_len,
+ (unsigned char *)buffer,
+@@ -157,6 +187,8 @@ emile_binbuf_cipher(Emile_Cipher_Algorit
+ goto on_error;
+
+ EVP_CIPHER_CTX_cleanup(&ctx);
++#endif
++
+ free(buffer);
+
+ return result;
+@@ -167,8 +199,11 @@ on_error:
+
+ /* Openssl error */
+ if (opened)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_CIPHER_CTX_free(ctx);
++#else
+ EVP_CIPHER_CTX_cleanup(&ctx);
+-
++#endif
+ free(buffer);
+
+ /* General error */
+@@ -186,7 +221,11 @@ emile_binbuf_decipher(Emile_Cipher_Algor
+ {
+ Eina_Binbuf *result = NULL;
+ unsigned int *over;
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_CIPHER_CTX *ctx;
++#else
+ EVP_CIPHER_CTX ctx;
++#endif
+ unsigned char ik[MAX_KEY_LEN];
+ unsigned char iv[MAX_IV_LEN];
+ unsigned char key_material[MAX_KEY_LEN + MAX_IV_LEN];
+@@ -230,15 +269,35 @@ emile_binbuf_decipher(Emile_Cipher_Algor
+ eina_binbuf_append_length(result, (unsigned char*) (over + 1), tmp_len);
+
+ /* Openssl create the corresponding cipher */
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL)
++ goto on_error;
++ opened = 1;
++
++ if (!EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, ik, iv))
++ goto on_error;
++#else
+ EVP_CIPHER_CTX_init(&ctx);
+ opened = 1;
+
+ if (!EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
+ goto on_error;
++#endif
+
+ memset(iv, 0, sizeof (iv));
+ memset(ik, 0, sizeof (ik));
+
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ /* Openssl decrypt */
++ if (!EVP_DecryptUpdate(ctx,
++ (void*) eina_binbuf_string_get(result), &tmp,
++ (void*) (over + 1), tmp_len))
++ goto on_error;
++
++ /* Openssl close the cipher*/
++ EVP_CIPHER_CTX_free(ctx);
++#else
+ /* Openssl decrypt */
+ if (!EVP_DecryptUpdate(&ctx,
+ (void*) eina_binbuf_string_get(result), &tmp,
+@@ -247,6 +306,7 @@ emile_binbuf_decipher(Emile_Cipher_Algor
+
+ /* Openssl close the cipher*/
+ EVP_CIPHER_CTX_cleanup(&ctx);
++#endif
+
+ /* Get the decrypted data size */
+ tmp = *(unsigned int*)(eina_binbuf_string_get(result));
+@@ -265,7 +325,11 @@ on_error:
+ memset(ik, 0, sizeof (ik));
+
+ if (opened)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ EVP_CIPHER_CTX_free(ctx);
++#else
+ EVP_CIPHER_CTX_cleanup(&ctx);
++#endif
+
+ eina_binbuf_free(result);
+
More information about the arch-commits
mailing list