pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/eet Update to eet-1.7.10 with an additional patc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2314cd7e2fd1
branches:  trunk
changeset: 427766:2314cd7e2fd1
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Apr 20 13:19:38 2020 +0000

description:
Update to eet-1.7.10 with an additional patch for OpenSSL 1.1:
    * Fix memory leak in eet_image.
    * With segfault with edje_cc in some cases
    * Fix eet_cache_concurrency test

diffstat:

 devel/eet/Makefile                            |   10 +-
 devel/eet/distinfo                            |   12 +-
 devel/eet/patches/patch-aa                    |   24 --
 devel/eet/patches/patch-src_lib_eet__cipher.c |  237 ++++++++++++++++++++++++++
 4 files changed, 249 insertions(+), 34 deletions(-)

diffs (truncated from 317 to 300 lines):

diff -r 43afbdbec443 -r 2314cd7e2fd1 devel/eet/Makefile
--- a/devel/eet/Makefile        Mon Apr 20 13:15:40 2020 +0000
+++ b/devel/eet/Makefile        Mon Apr 20 13:19:38 2020 +0000
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.30 2020/01/18 21:48:02 jperkin Exp $
+# $NetBSD: Makefile,v 1.31 2020/04/20 13:19:38 joerg Exp $
 #
 
-DISTNAME=      eet-1.7.7
-PKGREVISION=   3
+DISTNAME=      eet-1.7.10
 CATEGORIES=    devel archivers
-MASTER_SITES=  http://download.enlightenment.org/releases/
+MASTER_SITES=  http://download.enlightenment.org/att/releases/
 EXTRACT_SUFX=  .tar.bz2
 
 MAINTAINER=    joerg%NetBSD.org@localhost
@@ -20,10 +19,13 @@
 
 INSTALLATION_DIRS=     share/doc/eet
 
+CONFIGURE_ARGS+=       --enable-tests
+
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/COPYING ${WRKSRC}/AUTHORS \
            ${DESTDIR}${PREFIX}/share/doc/eet
 
+BUILDLINK_API_DEPENDS.eina+=   eina>=1.7.10
 .include "../../devel/eina/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
diff -r 43afbdbec443 -r 2314cd7e2fd1 devel/eet/distinfo
--- a/devel/eet/distinfo        Mon Apr 20 13:15:40 2020 +0000
+++ b/devel/eet/distinfo        Mon Apr 20 13:19:38 2020 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.12 2015/11/03 03:27:24 agc Exp $
+$NetBSD: distinfo,v 1.13 2020/04/20 13:19:38 joerg Exp $
 
-SHA1 (eet-1.7.7.tar.bz2) = 3f9001a118048e438f013f66a301dd92808c9784
-RMD160 (eet-1.7.7.tar.bz2) = 97397939b2a1706cc378354f1bd597abdc933f32
-SHA512 (eet-1.7.7.tar.bz2) = 0ca203feac04344dd007302e48874d5ea4629190fc5ce58d78035c1234823e47604575c66340b57ae3d0c7134c1087050ca0954c898320a62ae7c55b87177785
-Size (eet-1.7.7.tar.bz2) = 578874 bytes
-SHA1 (patch-aa) = 3915ca93e3310900850ff499d141460295d3046b
+SHA1 (eet-1.7.10.tar.bz2) = 3ca915debfb9f563785424485b0f5c74d6caa0da
+RMD160 (eet-1.7.10.tar.bz2) = c748ab6f2d088f05657f87f3c6b77b1d0e527067
+SHA512 (eet-1.7.10.tar.bz2) = 4e4cee77ed8ece65f482ab2535ffc033d06837e8e9f8d109c9ea90eeeaa07f2cac0519a563bd715c7442837b703d55b18222535bd06d9a1c0319dfec2966e1f8
+Size (eet-1.7.10.tar.bz2) = 573420 bytes
+SHA1 (patch-src_lib_eet__cipher.c) = 94c529bdfc930329db1408661091908e2eb24cc1
diff -r 43afbdbec443 -r 2314cd7e2fd1 devel/eet/patches/patch-aa
--- a/devel/eet/patches/patch-aa        Mon Apr 20 13:15:40 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2011/12/07 15:15:53 joerg Exp $
-
---- src/lib/eet_cipher.c.orig  2011-11-21 02:09:15.000000000 +0000
-+++ src/lib/eet_cipher.c
-@@ -407,8 +407,18 @@ on_error:
-    dh = EVP_PKEY_get1_DH(key->private_key);
-    if (dh)
-      {
-+        BIO *b;
-         fprintf(out, "Private key (DH):\n");
--        DHparams_print_fp(out, dh);
-+        if ((b=BIO_new(BIO_s_file())) == NULL)
-+          {
-+            DHerr(DH_F_DHPARAMS_PRINT_FP,ERR_R_BUF_LIB);
-+          }
-+        else
-+          {
-+            BIO_set_fp(b, out, BIO_NOCLOSE);
-+            DHparams_print(b, dh);
-+            BIO_free(b);
-+          }
-      }
- 
-    fprintf(out, "Public certificate:\n");
diff -r 43afbdbec443 -r 2314cd7e2fd1 devel/eet/patches/patch-src_lib_eet__cipher.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/eet/patches/patch-src_lib_eet__cipher.c     Mon Apr 20 13:19:38 2020 +0000
@@ -0,0 +1,237 @@
+$NetBSD: patch-src_lib_eet__cipher.c,v 1.1 2020/04/20 13:19:38 joerg Exp $
+
+--- src/lib/eet_cipher.c.orig  2013-07-29 14:22:39.000000000 +0000
++++ src/lib/eet_cipher.c
+@@ -410,8 +410,18 @@ on_error:
+    dh = EVP_PKEY_get1_DH(key->private_key);
+    if (dh)
+      {
++        BIO *b;
+         fprintf(out, "Private key (DH):\n");
+-        DHparams_print_fp(out, dh);
++        if ((b=BIO_new(BIO_s_file())) == NULL)
++          {
++            DHerr(DH_F_DHPARAMS_PRINT_FP,ERR_R_BUF_LIB);
++          }
++        else
++          {
++            BIO_set_fp(b, out, BIO_NOCLOSE);
++            DHparams_print(b, dh);
++            BIO_free(b);
++          }
+      }
+ 
+    fprintf(out, "Public certificate:\n");
+@@ -505,7 +515,7 @@ eet_identity_sign(FILE    *fp,
+    gnutls_privkey_t privkey;
+ #endif
+ # else /* ifdef HAVE_GNUTLS */
+-   EVP_MD_CTX md_ctx;
++   EVP_MD_CTX *md_ctx;
+    unsigned int sign_len = 0;
+    int cert_len = 0;
+ # endif /* ifdef HAVE_GNUTLS */
+@@ -614,9 +624,16 @@ eet_identity_sign(FILE    *fp,
+      }
+ 
+    /* Do the signature. */
+-   EVP_SignInit(&md_ctx, EVP_sha1());
+-   EVP_SignUpdate(&md_ctx, data, st_buf.st_size);
+-   err = EVP_SignFinal(&md_ctx,
++   md_ctx = EVP_MD_CTX_create();
++   if (md_ctx == NULL)
++     {
++        ERR_print_errors_fp(stdout);
++        err = EET_ERROR_SIGNATURE_FAILED;
++        goto on_error;
++     }
++   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);
+@@ -626,6 +643,7 @@ eet_identity_sign(FILE    *fp,
+         err = EET_ERROR_SIGNATURE_FAILED;
+         goto on_error;
+      }
++   EVP_MD_CTX_free(md_ctx);
+ 
+    /* Give me the der (binary form for X509). */
+    cert_len = i2d_X509(key->certificate, &cert);
+@@ -814,7 +832,7 @@ eet_identity_check(const void   *data_ba
+    const unsigned char *tmp;
+    EVP_PKEY *pkey;
+    X509 *x509;
+-   EVP_MD_CTX md_ctx;
++   EVP_MD_CTX *md_ctx;
+    int err;
+ 
+    /* Strange but d2i_X509 seems to put 0 all over the place. */
+@@ -833,9 +851,16 @@ eet_identity_check(const void   *data_ba
+      }
+ 
+    /* 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);
++   md_ctx = EVP_MD_CTX_create();
++   if (!md_ctx)
++     {
++        X509_free(x509);
++        return NULL;
++     }
++   EVP_VerifyInit(md_ctx, EVP_sha1());
++   EVP_VerifyUpdate(md_ctx, data_base, data_length);
++   err = EVP_VerifyFinal(md_ctx, sign, sign_len, pkey);
++   EVP_MD_CTX_free(md_ctx);
+ 
+    X509_free(x509);
+    EVP_PKEY_free(pkey);
+@@ -971,7 +996,7 @@ eet_cipher(const void   *data,
+    gcry_cipher_hd_t cipher;
+ # else /* ifdef HAVE_GNUTLS */
+    /* Openssl declarations*/
+-   EVP_CIPHER_CTX ctx;
++   EVP_CIPHER_CTX *ctx;
+    unsigned int *buffer = NULL;
+    int tmp_len;
+ # endif /* ifdef HAVE_GNUTLS */
+@@ -1055,27 +1080,28 @@ eet_cipher(const void   *data,
+ 
+    /* 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))
++   ctx = EVP_CIPHER_CTX_new();
++   if (!ctx)
+      goto on_error;
+-
+    opened = 1;
++   if (!EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, ik, iv))
++     goto on_error;
+ 
+    memset(iv, 0, sizeof (iv));
+    memset(ik, 0, sizeof (ik));
+ 
+    /* Openssl encrypt */
+-   if (!EVP_EncryptUpdate(&ctx, (unsigned char *)(ret + 1), &tmp_len,
++   if (!EVP_EncryptUpdate(ctx, (unsigned char *)(ret + 1), &tmp_len,
+                           (unsigned char *)buffer,
+                           size + sizeof(unsigned int)))
+      goto on_error;
+ 
+    /* Openssl close the cipher */
+-   if (!EVP_EncryptFinal_ex(&ctx, ((unsigned char *)(ret + 1)) + tmp_len,
++   if (!EVP_EncryptFinal_ex(ctx, ((unsigned char *)(ret + 1)) + tmp_len,
+                             &tmp_len))
+      goto on_error;
+ 
+-   EVP_CIPHER_CTX_cleanup(&ctx);
++   EVP_CIPHER_CTX_cleanup(ctx);
+    free(buffer);
+ # endif /* ifdef HAVE_GNUTLS */
+ 
+@@ -1102,7 +1128,7 @@ on_error:
+ # else /* ifdef HAVE_GNUTLS */
+    /* Openssl error */
+    if (opened)
+-     EVP_CIPHER_CTX_cleanup(&ctx);
++     EVP_CIPHER_CTX_free(ctx);
+ 
+    free(buffer);
+    
+@@ -1203,26 +1229,28 @@ eet_decipher(const void   *data,
+    gcry_cipher_close(cipher);
+ 
+ # else /* ifdef HAVE_GNUTLS */
+-   EVP_CIPHER_CTX ctx;
++   EVP_CIPHER_CTX *ctx;
+    int opened = 0;
+ 
+    /* Openssl create the corresponding cipher */
+-   EVP_CIPHER_CTX_init(&ctx);
++   ctx = EVP_CIPHER_CTX_new();
++   if (!ctx)
++     goto on_error;
+    opened = 1;
+ 
+-   if (!EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
++   if (!EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, ik, iv))
+      goto on_error;
+ 
+    memset(iv, 0, sizeof (iv));
+    memset(ik, 0, sizeof (ik));
+ 
+    /* Openssl decrypt */
+-   if (!EVP_DecryptUpdate(&ctx, (unsigned char *)ret, &tmp,
++   if (!EVP_DecryptUpdate(ctx, (unsigned char *)ret, &tmp,
+                           (unsigned char *)(over + 1), tmp_len))
+      goto on_error;
+ 
+    /* Openssl close the cipher*/
+-   EVP_CIPHER_CTX_cleanup(&ctx);
++   EVP_CIPHER_CTX_free(ctx);
+ # endif /* ifdef HAVE_GNUTLS */
+    /* Get the decrypted data size */
+    tmp = *ret;
+@@ -1255,7 +1283,7 @@ on_error:
+ # ifdef HAVE_GNUTLS
+ # else
+    if (opened)
+-     EVP_CIPHER_CTX_cleanup(&ctx);
++     EVP_CIPHER_CTX_free(ctx);
+ 
+ # endif /* ifdef HAVE_GNUTLS */
+    if (result)
+@@ -1342,13 +1370,19 @@ eet_pbkdf2_sha1(const char          *key
+    int j, k;
+ # ifdef HAVE_GNUTLS
+ # else
+-   HMAC_CTX hctx;
++   HMAC_CTX *hctx;
+ # endif /* ifdef HAVE_GNUTLS */
+ 
+    buf = alloca(salt_len + 4);
+    if (!buf)
+      return 1;
+ 
++# ifdef HAVE_GNUTLS
++# else
++   hctx = HMAC_CTX_new();
++   if (!hctx)
++     return 1;
++# endif /* ifdef HAVE_GNUTLS */
+    for (i = 1; len; len -= tmp_len, p += tmp_len, i++)
+      {
+         if (len > digest_len)
+@@ -1366,10 +1400,10 @@ eet_pbkdf2_sha1(const char          *key
+         memcpy(buf + salt_len, tab, 4);
+         eet_hmac_sha1(key, key_len, buf, salt_len + 4, digest);
+ # else /* ifdef HAVE_GNUTLS */
+-        HMAC_Init(&hctx, key, key_len, EVP_sha1());
+-        HMAC_Update(&hctx, salt, salt_len);
+-        HMAC_Update(&hctx, tab, 4);
+-        HMAC_Final(&hctx, digest, NULL);
++        HMAC_Init_ex(hctx, key, key_len, EVP_sha1(), NULL);
++        HMAC_Update(hctx, salt, salt_len);
++        HMAC_Update(hctx, tab, 4);
++        HMAC_Final(hctx, digest, NULL);
+ # endif /* ifdef HAVE_GNUTLS */



Home | Main Index | Thread Index | Old Index