summaryrefslogtreecommitdiff
path: root/security/heimdal/patches
diff options
context:
space:
mode:
authorobache <obache>2010-11-30 07:12:49 +0000
committerobache <obache>2010-11-30 07:12:49 +0000
commit64c3fbf4b3abb4af788bb626a50496e02503a627 (patch)
tree3e52ed70f49da42a6cfe551d762fa255cd04dd42 /security/heimdal/patches
parent3f8405a3fd682abf85ab4cb808ec4f2fcd7cad1e (diff)
downloadpkgsrc-64c3fbf4b3abb4af788bb626a50496e02503a627.tar.gz
Fixes build with OPENSSL_NO_MD2.
Diffstat (limited to 'security/heimdal/patches')
-rw-r--r--security/heimdal/patches/patch-ah14
-rw-r--r--security/heimdal/patches/patch-at120
-rw-r--r--security/heimdal/patches/patch-au14
3 files changed, 148 insertions, 0 deletions
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 <openssl/des.h>\n", f);
+ fputs("#include <openssl/rc4.h>\n", f);
+ fputs("#include <openssl/rc2.h>\n", f);
++ fputs("#ifndef OPENSSL_NO_MD2\n", f);
+ fputs("#include <openssl/md2.h>\n", f);
++ fputs("#endif /* OPENSSL_NO_MD2 */\n", f);
+ fputs("#include <openssl/md4.h>\n", f);
+ fputs("#include <openssl/md5.h>\n", f);
+ fputs("#include <openssl/sha.h>\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");