From 63ebcae0aa2630d70824ac88fda709c8a4e8654f Mon Sep 17 00:00:00 2001 From: obache Date: Tue, 30 Nov 2010 07:12:49 +0000 Subject: Fixes build with OPENSSL_NO_MD2. --- security/heimdal/distinfo | 5 +- security/heimdal/patches/patch-ah | 14 +++++ security/heimdal/patches/patch-at | 120 ++++++++++++++++++++++++++++++++++++++ security/heimdal/patches/patch-au | 14 +++++ 4 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 security/heimdal/patches/patch-ah create mode 100644 security/heimdal/patches/patch-at create mode 100644 security/heimdal/patches/patch-au (limited to 'security/heimdal') diff --git a/security/heimdal/distinfo b/security/heimdal/distinfo index 1887222ab92..0325ddc350f 100644 --- a/security/heimdal/distinfo +++ b/security/heimdal/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.25 2008/11/25 07:09:54 hasso Exp $ +$NetBSD: distinfo,v 1.26 2010/11/30 07:12:49 obache Exp $ SHA1 (heimdal-1.1.tar.gz) = 64ddb2a2c47f732b2d9bbf2621062eaffa32e10f RMD160 (heimdal-1.1.tar.gz) = fecda9ca4db5b11c680aa3cccd705d22f98f25b7 @@ -6,6 +6,9 @@ Size (heimdal-1.1.tar.gz) = 3622005 bytes SHA1 (patch-aa) = f0c74f3711ce3b6092aa2476323f7715929e367f SHA1 (patch-ac) = d5df5fbd77d1750eef9359ceac907547175e11dd SHA1 (patch-ad) = 671f68d337029b1dc935d48ce3ae458355376c6b +SHA1 (patch-ah) = c8ea19182402cb778ebe13447c85f935554b0dbf SHA1 (patch-al) = 2e92de5779abf7455d1bea79999949faa0417945 SHA1 (patch-ar) = 05564ffaf170c13187c66e45f1f124352bfc092e SHA1 (patch-as) = dc314360d65b6acf1c23ffcbef23a4f750c62dab +SHA1 (patch-at) = cdebcb4db12f336e8b2e99d73b2f797724ba3b2a +SHA1 (patch-au) = fc90a6ee55f98170730cae404b78bc189de9d866 diff --git a/security/heimdal/patches/patch-ah b/security/heimdal/patches/patch-ah new file mode 100644 index 00000000000..b8753a8e8fd --- /dev/null +++ b/security/heimdal/patches/patch-ah @@ -0,0 +1,14 @@ +$NetBSD: patch-ah,v 1.5 2010/11/30 07:12:49 obache Exp $ + +--- include/make_crypto.c.orig 2008-01-24 13:13:41.000000000 +0000 ++++ include/make_crypto.c +@@ -71,7 +71,9 @@ main(int argc, char **argv) + fputs("#include \n", f); + fputs("#include \n", f); + fputs("#include \n", f); ++ fputs("#ifndef OPENSSL_NO_MD2\n", f); + fputs("#include \n", f); ++ fputs("#endif /* OPENSSL_NO_MD2 */\n", f); + fputs("#include \n", f); + fputs("#include \n", f); + fputs("#include \n", f); diff --git a/security/heimdal/patches/patch-at b/security/heimdal/patches/patch-at new file mode 100644 index 00000000000..ccdc1de2ee3 --- /dev/null +++ b/security/heimdal/patches/patch-at @@ -0,0 +1,120 @@ +$NetBSD: patch-at,v 1.1 2010/11/30 07:12:49 obache Exp $ + +--- lib/hx509/crypto.c.orig 2008-01-24 13:13:22.000000000 +0000 ++++ lib/hx509/crypto.c +@@ -841,6 +841,7 @@ md5_verify_signature(hx509_context conte + return 0; + } + ++#ifndef OPENSSL_NO_MD2 + static int + md2_verify_signature(hx509_context context, + const struct signature_alg *sig_alg, +@@ -870,6 +871,7 @@ md2_verify_signature(hx509_context conte + + return 0; + } ++#endif + + static const struct signature_alg heim_rsa_pkcs1_x509 = { + "rsa-pkcs1-x509", +@@ -926,6 +928,7 @@ static const struct signature_alg rsa_wi + rsa_create_signature + }; + ++#ifndef OPENSSL_NO_MD2 + static const struct signature_alg rsa_with_md2_alg = { + "rsa-with-md2", + oid_id_pkcs1_md2WithRSAEncryption, +@@ -936,6 +939,7 @@ static const struct signature_alg rsa_wi + rsa_verify_signature, + rsa_create_signature + }; ++#endif + + static const struct signature_alg dsa_sha1_alg = { + "dsa-with-sha1", +@@ -980,6 +984,7 @@ static const struct signature_alg md5_al + md5_verify_signature + }; + ++#ifndef OPENSSL_NO_MD2 + static const struct signature_alg md2_alg = { + "rsa-md2", + oid_id_rsa_digest_md2, +@@ -989,6 +994,7 @@ static const struct signature_alg md2_al + SIG_DIGEST, + md2_verify_signature + }; ++#endif + + /* + * Order matter in this structure, "best" first for each "key +@@ -1000,13 +1006,17 @@ static const struct signature_alg *sig_a + &rsa_with_sha1_alg, + &pkcs1_rsa_sha1_alg, + &rsa_with_md5_alg, ++#ifndef OPENSSL_NO_MD2 + &rsa_with_md2_alg, ++#endif + &heim_rsa_pkcs1_x509, + &dsa_sha1_alg, + &sha256_alg, + &sha1_alg, + &md5_alg, ++#ifndef OPENSSL_NO_MD2 + &md2_alg, ++#endif + NULL + }; + +@@ -1432,10 +1442,12 @@ const AlgorithmIdentifier _hx509_signatu + { 6, rk_UNCONST(md5_oid_tree) }, rk_UNCONST(&null_entry_oid) + }; + ++#ifndef OPENSSL_NO_MD2 + static const unsigned md2_oid_tree[] = { 1, 2, 840, 113549, 2, 2 }; + const AlgorithmIdentifier _hx509_signature_md2_data = { + { 6, rk_UNCONST(md2_oid_tree) }, rk_UNCONST(&null_entry_oid) + }; ++#endif + + static const unsigned rsa_with_sha512_oid[] ={ 1, 2, 840, 113549, 1, 1, 13 }; + const AlgorithmIdentifier _hx509_signature_rsa_with_sha512_data = { +@@ -1462,10 +1474,12 @@ const AlgorithmIdentifier _hx509_signatu + { 7, rk_UNCONST(rsa_with_md5_oid) }, NULL + }; + ++#ifndef OPENSSL_NO_MD2 + static const unsigned rsa_with_md2_oid[] ={ 1, 2, 840, 113549, 1, 1, 2 }; + const AlgorithmIdentifier _hx509_signature_rsa_with_md2_data = { + { 7, rk_UNCONST(rsa_with_md2_oid) }, NULL + }; ++#endif + + static const unsigned rsa_oid[] ={ 1, 2, 840, 113549, 1, 1, 1 }; + const AlgorithmIdentifier _hx509_signature_rsa_data = { +@@ -1512,9 +1526,11 @@ const AlgorithmIdentifier * + hx509_signature_md5(void) + { return &_hx509_signature_md5_data; } + ++#ifndef OPENSSL_NO_MD2 + const AlgorithmIdentifier * + hx509_signature_md2(void) + { return &_hx509_signature_md2_data; } ++#endif + + const AlgorithmIdentifier * + hx509_signature_rsa_with_sha512(void) +@@ -1536,9 +1552,11 @@ const AlgorithmIdentifier * + hx509_signature_rsa_with_md5(void) + { return &_hx509_signature_rsa_with_md5_data; } + ++#ifndef OPENSSL_NO_MD2 + const AlgorithmIdentifier * + hx509_signature_rsa_with_md2(void) + { return &_hx509_signature_rsa_with_md2_data; } ++#endif + + const AlgorithmIdentifier * + hx509_signature_rsa(void) diff --git a/security/heimdal/patches/patch-au b/security/heimdal/patches/patch-au new file mode 100644 index 00000000000..7608841e1ee --- /dev/null +++ b/security/heimdal/patches/patch-au @@ -0,0 +1,14 @@ +$NetBSD: patch-au,v 1.1 2010/11/30 07:12:49 obache Exp $ + +--- lib/hx509/ks_p11.c.orig 2008-01-24 13:13:22.000000000 +0000 ++++ lib/hx509/ks_p11.c +@@ -1142,7 +1142,9 @@ p11_printinfo(hx509_context context, + MECHNAME(CKM_SHA256, "sha256"); + MECHNAME(CKM_SHA_1, "sha1"); + MECHNAME(CKM_MD5, "md5"); ++#ifndef OPENSSL_NO_MD2 + MECHNAME(CKM_MD2, "md2"); ++#endif + MECHNAME(CKM_RIPEMD160, "ripemd-160"); + MECHNAME(CKM_DES_ECB, "des-ecb"); + MECHNAME(CKM_DES_CBC, "des-cbc"); -- cgit v1.2.3