[arch-commits] Commit in balsa/trunk (PKGBUILD balsa-openssl-1.1.patch)

Antonio Rojas arojas at archlinux.org
Fri Mar 3 20:33:45 UTC 2017


    Date: Friday, March 3, 2017 @ 20:33:44
  Author: arojas
Revision: 214696

openssl 1.1 rebuild

Added:
  balsa/trunk/balsa-openssl-1.1.patch
Modified:
  balsa/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   13 +++++--
 balsa-openssl-1.1.patch |   78 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-03-03 20:32:45 UTC (rev 214695)
+++ PKGBUILD	2017-03-03 20:33:44 UTC (rev 214696)
@@ -6,7 +6,7 @@
 
 pkgname=balsa
 pkgver=2.5.3
-pkgrel=2
+pkgrel=3
 pkgdesc="An e-mail client for GNOME"
 arch=('i686' 'x86_64')
 url='http://pawsa.fedorapeople.org/balsa/'
@@ -15,9 +15,16 @@
          'gpgme' 'gtksourceview3' 'gspell' 'desktop-file-utils')
 makedepends=('yelp-tools' 'intltool')
 changelog=$pkgname.changelog
-source=(https://pawsa.fedorapeople.org/balsa/$pkgname-$pkgver.tar.bz2)
-sha256sums=('b896ea6b16b31725e0d81ba4eac398b39ad5c33f2337a260448d2feac7e55396')
+source=(https://pawsa.fedorapeople.org/balsa/$pkgname-$pkgver.tar.bz2 balsa-openssl-1.1.patch)
+sha256sums=('b896ea6b16b31725e0d81ba4eac398b39ad5c33f2337a260448d2feac7e55396'
+            '53f5639ffe5195803b8526c7a1e1ef2b96f6ba11c21b2a6b67e43c6433b3dca2')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # Fix build with openssl 1.1 (Fedora)
+  patch -p1 -i ../balsa-openssl-1.1.patch
+}
+
 build() {
   cd "${srcdir}"/$pkgname-$pkgver
 

Added: balsa-openssl-1.1.patch
===================================================================
--- balsa-openssl-1.1.patch	                        (rev 0)
+++ balsa-openssl-1.1.patch	2017-03-03 20:33:44 UTC (rev 214696)
@@ -0,0 +1,78 @@
+diff --git a/libbalsa/imap/auth-cram.c b/libbalsa/imap/auth-cram.c
+index 62e076a..c29d327 100644
+--- a/libbalsa/imap/auth-cram.c
++++ b/libbalsa/imap/auth-cram.c
+@@ -131,7 +131,7 @@ static void
+ hmac_md5 (const char* password, char* challenge,
+           unsigned char* response)
+ {  
+-  EVP_MD_CTX ctx;
++  EVP_MD_CTX *ctx = EVP_MD_CTX_create();
+   unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN];
+   unsigned char secret[MD5_BLOCK_LEN+1];
+   unsigned int secret_len, chal_len;
+@@ -143,9 +143,9 @@ hmac_md5 (const char* password, char* challenge,
+   /* passwords longer than MD5_BLOCK_LEN bytes are substituted with their MD5
+    * digests */
+   if (secret_len > MD5_BLOCK_LEN) {
+-	EVP_DigestInit(&ctx, EVP_md5());
+-	EVP_DigestUpdate(&ctx, (const unsigned char*) password, secret_len);
+-	EVP_DigestFinal(&ctx, secret, &secret_len);
++	EVP_DigestInit(ctx, EVP_md5());
++	EVP_DigestUpdate(ctx, (const unsigned char*) password, secret_len);
++	EVP_DigestFinal(ctx, secret, &secret_len);
+   }
+   else
+     strncpy ((char *) secret, password, sizeof (secret));
+@@ -161,14 +161,16 @@ hmac_md5 (const char* password, char* challenge,
+   }
+ 
+   /* inner hash: challenge and ipadded secret */
+-  EVP_DigestInit(&ctx, EVP_md5());
+-  EVP_DigestUpdate(&ctx, ipad, MD5_BLOCK_LEN);
+-  EVP_DigestUpdate(&ctx, (unsigned char*) challenge, chal_len);
+-  EVP_DigestFinal(&ctx, response, NULL);
++  EVP_DigestInit(ctx, EVP_md5());
++  EVP_DigestUpdate(ctx, ipad, MD5_BLOCK_LEN);
++  EVP_DigestUpdate(ctx, (unsigned char*) challenge, chal_len);
++  EVP_DigestFinal(ctx, response, NULL);
+ 
+   /* outer hash: inner hash and opadded secret */
+-  EVP_DigestInit(&ctx, EVP_md5());
+-  EVP_DigestUpdate(&ctx, opad, MD5_BLOCK_LEN);
+-  EVP_DigestUpdate(&ctx, response, chal_len);
+-  EVP_DigestFinal(&ctx, response, NULL);
++  EVP_DigestInit(ctx, EVP_md5());
++  EVP_DigestUpdate(ctx, opad, MD5_BLOCK_LEN);
++  EVP_DigestUpdate(ctx, response, MD5_DIGEST_LEN);
++  EVP_DigestFinal(ctx, response, NULL);
++
++  EVP_MD_CTX_destroy(ctx);
+ }
+diff --git a/libbalsa/imap/pop3.c b/libbalsa/imap/pop3.c
+index 5cb6dd5..a72ce61 100644
+--- a/libbalsa/imap/pop3.c
++++ b/libbalsa/imap/pop3.c
+@@ -310,16 +310,17 @@ get_apop_stamp(const char *greeting, char *stamp)
+ static void
+ compute_auth_hash(char *stamp, char *hash, const char *passwd)
+ {
+-  EVP_MD_CTX ctx;
++  EVP_MD_CTX* ctx = EVP_MD_CTX_create();
+   register unsigned char *dp;
+   register char *cp;
+   unsigned char *ep;
+   unsigned char digest[16];
+   
+-  EVP_DigestInit(&ctx, EVP_md5());
+-  EVP_DigestUpdate(&ctx, stamp, strlen(stamp));
+-  EVP_DigestUpdate(&ctx, passwd, strlen(passwd));
+-  EVP_DigestFinal(&ctx, digest, NULL);
++  EVP_DigestInit(ctx, EVP_md5());
++  EVP_DigestUpdate(ctx, stamp, strlen(stamp));
++  EVP_DigestUpdate(ctx, passwd, strlen(passwd));
++  EVP_DigestFinal(ctx, digest, NULL);
++  EVP_MD_CTX_destroy(ctx);
+   
+   cp = hash;
+   dp = digest;


More information about the arch-commits mailing list