summaryrefslogtreecommitdiff
path: root/mail/cue
diff options
context:
space:
mode:
authoritojun <itojun@pkgsrc.org>2003-08-04 12:06:23 +0000
committeritojun <itojun@pkgsrc.org>2003-08-04 12:06:23 +0000
commit64b5d211003a74dc686416db5ffb801e46e44579 (patch)
treecdde82a56c877a6af6f8a5951afedc8883891eca /mail/cue
parentdcc7cc5699cfbb2f124db0150920554a510f2168 (diff)
downloadpkgsrc-64b5d211003a74dc686416db5ffb801e46e44579.tar.gz
make it compilable with openssl 0.9.7. bump PKGREVISION to 1 (20030714nb1).
Diffstat (limited to 'mail/cue')
-rw-r--r--mail/cue/Makefile3
-rw-r--r--mail/cue/distinfo4
-rw-r--r--mail/cue/patches/patch-aa13
-rw-r--r--mail/cue/patches/patch-ab238
4 files changed, 256 insertions, 2 deletions
diff --git a/mail/cue/Makefile b/mail/cue/Makefile
index 8f683b3af91..d82507728d8 100644
--- a/mail/cue/Makefile
+++ b/mail/cue/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2003/07/17 21:45:49 grant Exp $
+# $NetBSD: Makefile,v 1.24 2003/08/04 12:06:23 itojun Exp $
DISTNAME= cue-snap-20030714
+PKGREVISION= 1
PKGNAME= cue-20030714
CATEGORIES= mail
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/cue/snap/
diff --git a/mail/cue/distinfo b/mail/cue/distinfo
index 48ffde55b2f..f30b3b8fc08 100644
--- a/mail/cue/distinfo
+++ b/mail/cue/distinfo
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.11 2003/07/16 09:24:14 itojun Exp $
+$NetBSD: distinfo,v 1.12 2003/08/04 12:06:23 itojun Exp $
SHA1 (cue-snap-20030714.tar.gz) = 96a2e5aaa9ae3efc9f48322d8c1e41831df08fd6
Size (cue-snap-20030714.tar.gz) = 125744 bytes
+SHA1 (patch-aa) = 2739bb02e36c5496b51aeea4a4979f49b09f4449
+SHA1 (patch-ab) = 1056756d326e3f4e31a7ed92c7ec43fd2026141d
diff --git a/mail/cue/patches/patch-aa b/mail/cue/patches/patch-aa
new file mode 100644
index 00000000000..c552bdcbf41
--- /dev/null
+++ b/mail/cue/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1 2003/08/04 12:06:24 itojun Exp $
+
+--- smime.c 2003-07-09 18:07:01.000000000 +0900
++++ smime.c 2003-08-04 21:00:15.000000000 +0900
+@@ -962,7 +962,7 @@
+ xalg->parameter = ASN1_TYPE_new();
+ BIO_ctrl(p7bio, BIO_C_GET_CIPHER_CTX, 1, (char *)&ctx);
+ if (EVP_CIPHER_CTX_nid(ctx) == NID_rc2_cbc) {
+- EVP_CIPHER *cipher;
++ const EVP_CIPHER *cipher;
+ STACK *rsk;
+ PKCS7_RECIP_INFO *ri;
+ u_char key[EVP_MAX_KEY_LENGTH];
diff --git a/mail/cue/patches/patch-ab b/mail/cue/patches/patch-ab
new file mode 100644
index 00000000000..974cc700b06
--- /dev/null
+++ b/mail/cue/patches/patch-ab
@@ -0,0 +1,238 @@
+$NetBSD: patch-ab,v 1.1 2003/08/04 12:06:24 itojun Exp $
+
+--- pgp.c 2003-07-08 18:31:47.000000000 +0900
++++ pgp.c 2003-08-04 20:20:27.000000000 +0900
+@@ -36,9 +36,11 @@
+ #include <unistd.h>
+
+ #ifdef OPENSSL
++#include <openssl/bn.h>
+ #include <openssl/rsa.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
++#include <openssl/opensslv.h>
+ #else /* OPENSSL */
+ #include <rsa.h>
+ #include <evp.h>
+@@ -62,7 +64,7 @@
+
+ static struct pgp_pkt * pgp_parsepkt(u_char **pp, u_char *ep);
+ static int pgp_makepkt(struct pgp_pkt *pkt, u_char **bufp, int *lenp);
+-static EVP_CIPHER * pgp_symalg_cipher(int alg);
++static const EVP_CIPHER * pgp_symalg_cipher(int alg);
+ static BIGNUM * pgp_decrypt_mpi(EVP_CIPHER_CTX *ctx, u_char **pp, u_short *sum);
+ static BIGNUM * pgp_parse_mpi(u_char **pp);
+
+@@ -697,7 +699,7 @@
+ }
+ }
+
+-static EVP_CIPHER *
++static const EVP_CIPHER *
+ pgp_symalg_cipher(int alg)
+ {
+ switch (alg) {
+@@ -717,7 +719,7 @@
+ return NULL;
+ }
+
+-static EVP_MD *
++static const EVP_MD *
+ pgp_hashalg_md(int alg)
+ {
+ switch (alg) {
+@@ -774,8 +776,8 @@
+ int
+ pgp_decrypt_seckey(struct pgp_pkt *pkt, int (*passwd_callback)(char *buf, int size, struct pgp_pkt *pkt))
+ {
+- EVP_CIPHER *cipher;
+- EVP_MD *md;
++ const EVP_CIPHER *cipher;
++ const EVP_MD *md;
+ EVP_CIPHER_CTX ctx;
+ u_char mdbuf[EVP_MAX_MD_SIZE];
+ u_int mdlen;
+@@ -954,7 +956,7 @@
+ case PGP_PUB_ELGAMAL_ENC:
+ {
+ BIGNUM *yy, *k;
+- BN_CTX bn_ctx;
++ BN_CTX *bn_ctx;
+ DH *dh = ((EVP_PKEY *)seckey->un.pubkey.key)->pkey.dh;
+
+ yy = pgp_parse_mpi(&p);
+@@ -966,15 +968,15 @@
+ BN_free(k);
+ return -1;
+ }
+- BN_CTX_init(&bn_ctx);
+- BN_mod_exp(yy, yy, dh->priv_key, dh->p, &bn_ctx);
+- BN_mod_inverse(yy, yy, dh->p, &bn_ctx);
+- BN_mod_mul(k, k, yy, dh->p, &bn_ctx);
++ bn_ctx = BN_CTX_new();
++ BN_mod_exp(yy, yy, dh->priv_key, dh->p, bn_ctx);
++ BN_mod_inverse(yy, yy, dh->p, bn_ctx);
++ BN_mod_mul(k, k, yy, dh->p, bn_ctx);
+ len = BN_num_bytes(k);
+ if ((buf = malloc(len)) == NULL)
+ return -1;
+ BN_bn2bin(k, buf);
+- BN_CTX_free(&bn_ctx);
++ BN_CTX_free(bn_ctx);
+ BN_free(k);
+ BN_free(yy);
+ /* padding */
+@@ -1049,7 +1051,7 @@
+ {
+ BIGNUM yy, xx, k, z;
+ BIGNUM *m;
+- BN_CTX bn_ctx;
++ BN_CTX *bn_ctx;
+ DH *dh = ((EVP_PKEY *)pubkey->un.pubkey.key)->pkey.dh;
+ u_char *buf;
+
+@@ -1075,11 +1077,11 @@
+
+ BN_init(&yy); BN_init(&xx); BN_init(&k); BN_init(&z);
+ i = BN_num_bits(dh->p) / 2; /* XXX */
+- BN_CTX_init(&bn_ctx);
++ bn_ctx = BN_CTX_new();
+ if (BN_rand(&xx, i, 0, 1)
+- && BN_mod_exp(&yy, dh->g, &xx, dh->p, &bn_ctx)
+- && BN_mod_exp(&z, dh->pub_key, &xx, dh->p, &bn_ctx)
+- && BN_mod_mul(&k, m, &z, dh->p, &bn_ctx)
++ && BN_mod_exp(&yy, dh->g, &xx, dh->p, bn_ctx)
++ && BN_mod_exp(&z, dh->pub_key, &xx, dh->p, bn_ctx)
++ && BN_mod_mul(&k, m, &z, dh->p, bn_ctx)
+ && (buf = malloc(BN_num_bytes(&yy) + BN_num_bytes(&k) + 2)) != NULL) {
+ p = buf;
+ i = BN_num_bits(&yy);
+@@ -1092,7 +1094,7 @@
+ pkt->dlen = p - buf;
+ ret = 0;
+ }
+- BN_CTX_free(&bn_ctx);
++ BN_CTX_free(bn_ctx);
+ BN_free(&yy); BN_free(&xx); BN_free(&k); BN_free(&z);
+ BN_free(m);
+ break;
+@@ -1106,7 +1108,7 @@
+ int
+ pgp_generate_seskey(struct pgp_pkt *pkt)
+ {
+- EVP_CIPHER *cipher;
++ const EVP_CIPHER *cipher;
+ int keylen;
+ u_char *p;
+ int len, i;
+@@ -1133,7 +1135,7 @@
+ int
+ pgp_decrypt_symdat(struct pgp_pkt *pkt, struct pgp_pkt *seskey)
+ {
+- EVP_CIPHER *cipher;
++ const EVP_CIPHER *cipher;
+ EVP_CIPHER_CTX ctx;
+ u_char iv[8];
+ u_char *p, *decbuf;
+@@ -1175,7 +1177,7 @@
+ int
+ pgp_encrypt_symdat(struct pgp_pkt *pkt, struct pgp_pkt *seskey)
+ {
+- EVP_CIPHER *cipher;
++ const EVP_CIPHER *cipher;
+ EVP_CIPHER_CTX ctx;
+ u_char iv[8], rand[16];
+ u_char *encbuf;
+@@ -1341,7 +1343,7 @@
+ }
+
+ /* XXX: PARSE ASN1! */
+-static EVP_MD *
++static const EVP_MD *
+ pgp_asn1_md(u_char **pp, int len)
+ {
+ static const u_char asn1_md2[] = {
+@@ -1392,7 +1394,7 @@
+ u_char *buf;
+ int ret, len;
+ u_char *p;
+- EVP_MD *md;
++ const EVP_MD *md;
+
+ if (pubkey->tag != PGP_TAG_PUBLIC_KEY
+ || sign->tag != PGP_TAG_SIGN
+@@ -1440,7 +1442,7 @@
+ BIGNUM *r, *s;
+ BIGNUM *h;
+ BIGNUM w, u1, u2, v;
+- BN_CTX bn_ctx;
++ BN_CTX *bn_ctx;
+
+ dsa = ((EVP_PKEY *)pubkey->un.pubkey.key)->pkey.dsa;
+ r = pgp_parse_mpi(&p);
+@@ -1449,17 +1451,17 @@
+ if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL ||
+ dsa->pub_key == NULL || r == NULL || s == NULL || h == NULL)
+ goto dsa_err;
+- BN_CTX_init(&bn_ctx);
++ bn_ctx = BN_CTX_new();
+ BN_init(&w); BN_init(&u1); BN_init(&u2); BN_init(&v);
+- if (BN_mod_inverse(&w, s, dsa->q, &bn_ctx)
+- && BN_mod_mul(&u1, h, &w, dsa->q, &bn_ctx)
+- && BN_mod_mul(&u2, r, &w, dsa->q, &bn_ctx)
++ if (BN_mod_inverse(&w, s, dsa->q, bn_ctx)
++ && BN_mod_mul(&u1, h, &w, dsa->q, bn_ctx)
++ && BN_mod_mul(&u2, r, &w, dsa->q, bn_ctx)
+ && BN_mod_exp2_mont(&v, dsa->g, &u1, dsa->pub_key, &u2,
+- dsa->p, &bn_ctx, NULL)
+- && BN_mod(&v, &v, dsa->q, &bn_ctx)
++ dsa->p, bn_ctx, NULL)
++ && BN_mod(&v, &v, dsa->q, bn_ctx)
+ && BN_ucmp(&v, r) == 0)
+ ret = 0;
+- BN_CTX_free(&bn_ctx);
++ BN_CTX_free(bn_ctx);
+ BN_free(&w); BN_free(&u1); BN_free(&u2); BN_free(&v);
+ dsa_err:
+ if (r) BN_free(r);
+@@ -1532,17 +1534,17 @@
+ {
+ DSA *dsa = ((EVP_PKEY *)seckey->un.pubkey.key)->pkey.dsa;
+ BIGNUM *kinv, *r, s, h;
+- BN_CTX bn_ctx;
++ BN_CTX *bn_ctx;
+
+- BN_CTX_init(&bn_ctx);
++ bn_ctx = BN_CTX_new();
+ kinv = NULL; r = NULL;
+ BN_init(&s); BN_init(&h);
+- if (DSA_sign_setup(dsa, &bn_ctx, &kinv, &r)
++ if (DSA_sign_setup(dsa, bn_ctx, &kinv, &r)
+ && BN_bin2bn(sign->un.sign.mdbuf, sign->un.sign.mdlen, &h)
+- && BN_mod_mul(&s, dsa->priv_key, r, dsa->q, &bn_ctx)
++ && BN_mod_mul(&s, dsa->priv_key, r, dsa->q, bn_ctx)
+ && BN_add(&s, &s, &h)
+ && (BN_cmp(&s, dsa->q) < 0 || BN_sub(&s, &s, dsa->q))
+- && BN_mod_mul(&s, &s, kinv, dsa->q, &bn_ctx)) {
++ && BN_mod_mul(&s, &s, kinv, dsa->q, bn_ctx)) {
+ len = BN_num_bytes(r) + BN_num_bytes(&s) + 4;
+ if ((sbuf = malloc(len)) != NULL) {
+ sign->dbuf = sign->pbuf = sbuf;
+@@ -1558,7 +1560,7 @@
+ }
+ }
+ BN_free(kinv); BN_free(r); BN_free(&s); BN_free(&h);
+- BN_CTX_free(&bn_ctx);
++ BN_CTX_free(bn_ctx);
+ break;
+ }
+ default:
+@@ -1720,7 +1722,7 @@
+ int
+ pgp_hash_data_init(struct pgp_pkt *sign)
+ {
+- EVP_MD *md;
++ const EVP_MD *md;
+ EVP_MD_CTX *ctx;
+
+ if ((md = pgp_hashalg_md(sign->un.sign.hashalg)) == NULL)