aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2016-09-12 15:14:14 +0000
committerJohn Marino <marino@FreeBSD.org>2016-09-12 15:14:14 +0000
commit6dd507bfc19481957eaf4fd19897cd13a856aa4e (patch)
tree5c1bd2882084605ffbb3495c6275123dc7153b6e
parent7b80b7b343e4dd87fc88caf79522e5193ef08c40 (diff)
downloadports-6dd507bfc19481957eaf4fd19897cd13a856aa4e.tar.gz
ports-6dd507bfc19481957eaf4fd19897cd13a856aa4e.zip
security/heimdal: Fix build when EGD is not available (e.g. LibreSSL)
Approved by: SSL blanket
Notes
Notes: svn path=/head/; revision=421928
-rw-r--r--security/heimdal/Makefile3
-rw-r--r--security/heimdal/files/patch-lib_hcrypto_rand-egd.c16
-rw-r--r--security/heimdal/files/patch-lib_krb5_crypto-rand.c13
3 files changed, 30 insertions, 2 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index ac97261c78df..6b72c611b914 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -20,9 +20,8 @@ CONFLICTS= krb4-[0-9]* krb5-[0-9]* krb5-maint-[0-9]* srp-[0-9]* \
wu-ftpd-[0-9]* wu-ftpd+ipv6-[0-9]*
USES= gettext gssapi:bootstrap,heimdal libtool pathfix pkgconfig \
- readline makeinfo
+ readline makeinfo ssl
USE_LDCONFIG= ${GSSAPILIBDIR}
-USE_OPENSSL= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
CONFIGURE_ENV= ac_cv_header_fnmatch_h=yes \
diff --git a/security/heimdal/files/patch-lib_hcrypto_rand-egd.c b/security/heimdal/files/patch-lib_hcrypto_rand-egd.c
new file mode 100644
index 000000000000..96d8686a4b91
--- /dev/null
+++ b/security/heimdal/files/patch-lib_hcrypto_rand-egd.c
@@ -0,0 +1,16 @@
+--- lib/hcrypto/rand-egd.c.orig 2012-12-09 22:06:44 UTC
++++ lib/hcrypto/rand-egd.c
+@@ -54,6 +54,7 @@ static const char *egd_path = "/var/run/
+
+ #define MAX_EGD_DATA 255
+
++#ifndef OPENSSL_NO_EGD
+ static int
+ connect_egd(const char *path)
+ {
+@@ -258,3 +259,5 @@ RAND_egd_bytes(const char *filename, int
+
+ return 1;
+ }
++
++#endif
diff --git a/security/heimdal/files/patch-lib_krb5_crypto-rand.c b/security/heimdal/files/patch-lib_krb5_crypto-rand.c
new file mode 100644
index 000000000000..734b7af84d0b
--- /dev/null
+++ b/security/heimdal/files/patch-lib_krb5_crypto-rand.c
@@ -0,0 +1,13 @@
+--- lib/krb5/crypto-rand.c.orig 2012-12-09 22:06:44 UTC
++++ lib/krb5/crypto-rand.c
+@@ -70,8 +70,10 @@ seed_something(void)
+ if (!krb5_init_context(&context)) {
+ p = krb5_config_get_string(context, NULL, "libdefaults",
+ "egd_socket", NULL);
++# ifndef OPENSSL_NO_EGD
+ if (p != NULL)
+ RAND_egd_bytes(p, ENTROPY_NEEDED);
++# endif
+ krb5_free_context(context);
+ }
+ #else