summaryrefslogtreecommitdiff
path: root/mail/cue
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-12-18 11:33:42 +0000
committerobache <obache@pkgsrc.org>2011-12-18 11:33:42 +0000
commit3578ee84ea17ec2a8d64135e20787ac6063be1d7 (patch)
tree3d02855a85879d955a5b54afc141f40b3801bce0 /mail/cue
parent78f0d39199e6ed0b1b67dae90a1b742858c702e3 (diff)
downloadpkgsrc-3578ee84ea17ec2a8d64135e20787ac6063be1d7.tar.gz
Fixes for OpenSSL without MD2 support.
Diffstat (limited to 'mail/cue')
-rw-r--r--mail/cue/Makefile5
-rw-r--r--mail/cue/distinfo3
-rw-r--r--mail/cue/patches/patch-pgp.c54
3 files changed, 57 insertions, 5 deletions
diff --git a/mail/cue/Makefile b/mail/cue/Makefile
index 94fcf27d143..9d2a6e838bb 100644
--- a/mail/cue/Makefile
+++ b/mail/cue/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2011/12/17 12:48:23 marino Exp $
+# $NetBSD: Makefile,v 1.63 2011/12/18 11:33:42 obache Exp $
DISTNAME= cue-snap-20100426
PKGNAME= ${DISTNAME:S/snap-//}
@@ -10,9 +10,6 @@ HOMEPAGE= # not available
COMMENT= Mh-e like mail user agent
LICENSE= modified-bsd
-# When cue supports OpenSSL 1.0 (e.g no MD2), remove following line:
-NOT_FOR_PLATFORM= DragonFly-*-*
-
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
diff --git a/mail/cue/distinfo b/mail/cue/distinfo
index 7fc6c47f07a..ff5da9ece79 100644
--- a/mail/cue/distinfo
+++ b/mail/cue/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.33 2011/11/27 13:05:33 obache Exp $
+$NetBSD: distinfo,v 1.34 2011/12/18 11:33:42 obache Exp $
SHA1 (cue-snap-20100426.tar.gz) = 37f758bb65a9b5e6089b23aabd655d2fdadc76e2
RMD160 (cue-snap-20100426.tar.gz) = cb908dc73c662ee22811cc4c09a64d81684eedea
Size (cue-snap-20100426.tar.gz) = 256759 bytes
SHA1 (patch-aa) = c83665ce01f9a56652a3ad650910f9b810cae4b4
SHA1 (patch-configure.in) = 3f7c2fe9ce3ab851d06cc6d4e31e8c3bdde6d709
+SHA1 (patch-pgp.c) = 88f370cf04d8806c2df02653f7857460151c93f6
diff --git a/mail/cue/patches/patch-pgp.c b/mail/cue/patches/patch-pgp.c
new file mode 100644
index 00000000000..3d1cf977ce7
--- /dev/null
+++ b/mail/cue/patches/patch-pgp.c
@@ -0,0 +1,54 @@
+$NetBSD: patch-pgp.c,v 1.1 2011/12/18 11:33:42 obache Exp $
+
+* for OpenSSL without MD2 support.
+
+--- pgp.c.orig 2009-12-16 05:51:12.000000000 +0000
++++ pgp.c
+@@ -763,7 +763,9 @@ pgp_hashalg_md(int alg)
+ case PGP_HASH_SHA1: return EVP_sha1();
+ case PGP_HASH_RIPEMD160: return EVP_ripemd160();
+ case PGP_HASH_DWSHA: return NULL;
++#ifndef OPENSSL_NO_MD2
+ case PGP_HASH_MD2: return EVP_md2();
++#endif
+ case PGP_HASH_TIGER192: return NULL;
+ case PGP_HASH_HAVAL_5_160: return NULL;
+ }
+@@ -1418,11 +1420,13 @@ pgp_comp_data(struct pgp_pkt *pkt)
+ static const EVP_MD *
+ pgp_asn1_md(u_char **pp, int len)
+ {
++#ifndef OPENSSL_NO_MD2
+ static const u_char asn1_md2[] = {
+ 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86,
+ 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02, 0x05, 0x00,
+ 0x04, 0x10
+ };
++#endif
+ static const u_char asn1_md5[] = {
+ 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86,
+ 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00,
+@@ -1437,11 +1441,13 @@ pgp_asn1_md(u_char **pp, int len)
+ 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14
+ };
+
++#ifndef OPENSSL_NO_MD2
+ if (len > sizeof(asn1_md2)
+ && memcmp(*pp, asn1_md2, sizeof(asn1_md2)) == 0) {
+ *pp += sizeof(asn1_md2);
+ return EVP_md2();
+ }
++#endif
+ if (len > sizeof(asn1_md5)
+ && memcmp(*pp, asn1_md5, sizeof(asn1_md5)) == 0) {
+ *pp += sizeof(asn1_md5);
+@@ -1969,7 +1975,9 @@ pgp_show_hashalg(int alg)
+ case PGP_HASH_SHA1: return "SHA1";
+ case PGP_HASH_RIPEMD160: return "RIPEMD160";
+ case PGP_HASH_DWSHA: return "DWSHA";
++#ifndef OPENSSL_NO_MD2
+ case PGP_HASH_MD2: return "MD2";
++#endif
+ case PGP_HASH_TIGER192: return "TIGER192";
+ case PGP_HASH_HAVAL_5_160: return "HAVAL-5-160";
+ }