pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/snownews snownews: Support OpenSSL 1.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2cd7e5d1143b
branches:  trunk
changeset: 397945:2cd7e5d1143b
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Jul 07 18:13:23 2019 +0000

description:
snownews: Support OpenSSL 1.1.

diffstat:

 www/snownews/Makefile                    |    4 +-
 www/snownews/distinfo                    |    4 +-
 www/snownews/patches/patch-conversions.c |   34 ++++++++
 www/snownews/patches/patch-digcalc.c     |  127 +++++++++++++++++++++++++++++++
 4 files changed, 166 insertions(+), 3 deletions(-)

diffs (196 lines):

diff -r c848e87b68ab -r 2cd7e5d1143b www/snownews/Makefile
--- a/www/snownews/Makefile     Sun Jul 07 18:02:43 2019 +0000
+++ b/www/snownews/Makefile     Sun Jul 07 18:13:23 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.52 2018/08/22 09:47:58 wiz Exp $
+# $NetBSD: Makefile,v 1.53 2019/07/07 18:13:23 nia Exp $
 
 DISTNAME=      snownews-1.5.12
-PKGREVISION=   14
+PKGREVISION=   15
 CATEGORIES=    www
 MASTER_SITES=  http://kiza.kcore.de/software/snownews/download/
 
diff -r c848e87b68ab -r 2cd7e5d1143b www/snownews/distinfo
--- a/www/snownews/distinfo     Sun Jul 07 18:02:43 2019 +0000
+++ b/www/snownews/distinfo     Sun Jul 07 18:13:23 2019 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.14 2015/11/04 02:47:39 agc Exp $
+$NetBSD: distinfo,v 1.15 2019/07/07 18:13:23 nia Exp $
 
 SHA1 (snownews-1.5.12.tar.gz) = b3addaac25c2c093aa5e60b8b89e50e7d7450bcf
 RMD160 (snownews-1.5.12.tar.gz) = dbe9c6b88e77ce37bb23e4d3ddc8d63f8bd66151
 SHA512 (snownews-1.5.12.tar.gz) = 7a7ccd5ea57f8bbb73f1429ab931a38203e858c74a383c5347e66088b84f6a7240feeee99e179687ce0a7a89c6c1406ce20d6c5d6771d25a0a0301fa5526e220
 Size (snownews-1.5.12.tar.gz) = 167944 bytes
+SHA1 (patch-conversions.c) = 4ca23e1a1c6f1b98533c4f74eba2e7aa2bed8e75
+SHA1 (patch-digcalc.c) = ce73645e350f8dad93c3801077ceb1628bbed5bd
 SHA1 (patch-os-support_c) = 144a9c0910618ddd64d5d56eb62aa8a9e8155145
diff -r c848e87b68ab -r 2cd7e5d1143b www/snownews/patches/patch-conversions.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/snownews/patches/patch-conversions.c  Sun Jul 07 18:13:23 2019 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-conversions.c,v 1.1 2019/07/07 18:13:23 nia Exp $
+
+Support OpenSSL 1.1.
+
+--- conversions.c.orig 2009-09-17 06:44:27.000000000 +0000
++++ conversions.c
+@@ -618,20 +618,21 @@ char * Hashify (const char * url) {
+ 
+ char * genItemHash (char ** hashitems, int items) {
+       int i;
+-      EVP_MD_CTX mdctx;
++      EVP_MD_CTX *mdctx;
+       unsigned char md_value[EVP_MAX_MD_SIZE];
+       unsigned int md_len;
+       char md5_hex[33];
+-
+-      EVP_DigestInit(&mdctx, EVP_md5());
++      
++      mdctx = EVP_MD_CTX_new();
++      EVP_DigestInit(mdctx, EVP_md5());
+       
+       for (i = 0; i < items; i++) {
+               if (hashitems[i] != NULL)
+-                      EVP_DigestUpdate(&mdctx, hashitems[i], (size_t) strlen(hashitems[i]));
++                      EVP_DigestUpdate(mdctx, hashitems[i], (size_t) strlen(hashitems[i]));
+       }
+       
+-      EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+-      EVP_MD_CTX_cleanup(&mdctx);
++      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++      EVP_MD_CTX_free(mdctx);
+       
+       for (i = 0; i < md_len; i++) {
+               sprintf(&md5_hex[2*i], "%02x", md_value[i]);
diff -r c848e87b68ab -r 2cd7e5d1143b www/snownews/patches/patch-digcalc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/snownews/patches/patch-digcalc.c      Sun Jul 07 18:13:23 2019 +0000
@@ -0,0 +1,127 @@
+$NetBSD: patch-digcalc.c,v 1.1 2019/07/07 18:13:23 nia Exp $
+
+Support OpenSSL 1.1.
+
+--- digcalc.c.orig     2009-09-17 06:44:27.000000000 +0000
++++ digcalc.c
+@@ -27,30 +27,32 @@ void DigestCalcHA1(
+     OUT HASHHEX SessionKey
+     )
+ {
+-      EVP_MD_CTX mdctx;
++      EVP_MD_CTX *mdctx;
+       unsigned char md_value[EVP_MAX_MD_SIZE];
+       unsigned int md_len;
+       int i;
+       HASH HA1;
+       
+-      EVP_DigestInit(&mdctx, EVP_md5());
+-      EVP_DigestUpdate(&mdctx, pszUserName, strlen(pszUserName));
+-      EVP_DigestUpdate(&mdctx, ":", 1);
+-      EVP_DigestUpdate(&mdctx, pszRealm, strlen(pszRealm));
+-      EVP_DigestUpdate(&mdctx, ":", 1);
+-      EVP_DigestUpdate(&mdctx, pszPassword, strlen(pszPassword));
+-      EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+-      EVP_MD_CTX_cleanup(&mdctx);
++      mdctx = EVP_MD_CTX_new();
++      EVP_DigestInit(mdctx, EVP_md5());
++      EVP_DigestUpdate(mdctx, pszUserName, strlen(pszUserName));
++      EVP_DigestUpdate(mdctx, ":", 1);
++      EVP_DigestUpdate(mdctx, pszRealm, strlen(pszRealm));
++      EVP_DigestUpdate(mdctx, ":", 1);
++      EVP_DigestUpdate(mdctx, pszPassword, strlen(pszPassword));
++      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++      EVP_MD_CTX_free(mdctx);
+       
+       if (strcmp(pszAlg, "md5-sess") == 0) {
+-              EVP_DigestInit(&mdctx, EVP_md5());
+-              EVP_DigestUpdate(&mdctx, HA1, HASHLEN);
+-              EVP_DigestUpdate(&mdctx, ":", 1);
+-              EVP_DigestUpdate(&mdctx, pszNonce, strlen(pszNonce));
+-              EVP_DigestUpdate(&mdctx, ":", 1);
+-              EVP_DigestUpdate(&mdctx, pszCNonce, strlen(pszCNonce));
+-              EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+-              EVP_MD_CTX_cleanup(&mdctx);
++              mdctx = EVP_MD_CTX_new();
++              EVP_DigestInit(mdctx, EVP_md5());
++              EVP_DigestUpdate(mdctx, HA1, HASHLEN);
++              EVP_DigestUpdate(mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, pszNonce, strlen(pszNonce));
++              EVP_DigestUpdate(mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, pszCNonce, strlen(pszCNonce));
++              EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++              EVP_MD_CTX_free(mdctx);
+       };
+       
+       for (i = 0; i < md_len; i++) {
+@@ -71,45 +73,47 @@ void DigestCalcResponse(
+     OUT HASHHEX Response      /* request-digest or response-digest */
+     )
+ {
+-      EVP_MD_CTX mdctx;
++      EVP_MD_CTX *mdctx;
+       HASHHEX HA2Hex;
+       unsigned char md_value[EVP_MAX_MD_SIZE];
+       unsigned int md_len;
+       int i;
+       
+       /* calculate H(A2) */
+-      EVP_DigestInit(&mdctx, EVP_md5());
+-      EVP_DigestUpdate(&mdctx, pszMethod, strlen(pszMethod));
+-      EVP_DigestUpdate(&mdctx, ":", 1);
+-      EVP_DigestUpdate(&mdctx, pszDigestUri, strlen(pszDigestUri));
++      mdctx = EVP_MD_CTX_new();
++      EVP_DigestInit(mdctx, EVP_md5());
++      EVP_DigestUpdate(mdctx, pszMethod, strlen(pszMethod));
++      EVP_DigestUpdate(mdctx, ":", 1);
++      EVP_DigestUpdate(mdctx, pszDigestUri, strlen(pszDigestUri));
+       if (strcmp(pszQop, "auth-int") == 0) {
+-              EVP_DigestUpdate(&mdctx, ":", 1);
+-              EVP_DigestUpdate(&mdctx, HEntity, HASHHEXLEN);
++              EVP_DigestUpdate(mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, HEntity, HASHHEXLEN);
+       };
+-      EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+-      EVP_MD_CTX_cleanup(&mdctx);
++      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++      EVP_MD_CTX_free(mdctx);
+       
+       for (i = 0; i < md_len; i++) {
+               sprintf(&HA2Hex[2*i], "%02x", md_value[i]);
+       }
+       
+       /* calculate response */
+-      EVP_DigestInit(&mdctx, EVP_md5());
+-      EVP_DigestUpdate(&mdctx, HA1, HASHHEXLEN);
+-      EVP_DigestUpdate(&mdctx, ":", 1);
+-      EVP_DigestUpdate(&mdctx, pszNonce, strlen(pszNonce));
+-      EVP_DigestUpdate(&mdctx, ":", 1);
++      mdctx = EVP_MD_CTX_new();
++      EVP_DigestInit(mdctx, EVP_md5());
++      EVP_DigestUpdate(mdctx, HA1, HASHHEXLEN);
++      EVP_DigestUpdate(mdctx, ":", 1);
++      EVP_DigestUpdate(mdctx, pszNonce, strlen(pszNonce));
++      EVP_DigestUpdate(mdctx, ":", 1);
+       if (*pszQop) {
+-              EVP_DigestUpdate(&mdctx, pszNonceCount, strlen(pszNonceCount));
+-              EVP_DigestUpdate(&mdctx, ":", 1);
+-              EVP_DigestUpdate(&mdctx, pszCNonce, strlen(pszCNonce));
+-              EVP_DigestUpdate(&mdctx, ":", 1);
+-              EVP_DigestUpdate(&mdctx, pszQop, strlen(pszQop));
+-              EVP_DigestUpdate(&mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, pszNonceCount, strlen(pszNonceCount));
++              EVP_DigestUpdate(mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, pszCNonce, strlen(pszCNonce));
++              EVP_DigestUpdate(mdctx, ":", 1);
++              EVP_DigestUpdate(mdctx, pszQop, strlen(pszQop));
++              EVP_DigestUpdate(mdctx, ":", 1);
+       };
+-      EVP_DigestUpdate(&mdctx, HA2Hex, HASHHEXLEN);
+-      EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+-      EVP_MD_CTX_cleanup(&mdctx);
++      EVP_DigestUpdate(mdctx, HA2Hex, HASHHEXLEN);
++      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++      EVP_MD_CTX_free(mdctx);
+       
+       for (i = 0; i < md_len; i++) {
+               sprintf(&Response[2*i], "%02x", md_value[i]);



Home | Main Index | Thread Index | Old Index