aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2016-09-12 23:14:14 +0800
committermarino <marino@FreeBSD.org>2016-09-12 23:14:14 +0800
commit3a16d7d5872e02a8c1950844cbf66fb6f1947df5 (patch)
tree5c1bd2882084605ffbb3495c6275123dc7153b6e /security
parentb73a8ffd3ef94fb0e6a80112b86cae82ac3bd2a4 (diff)
downloadfreebsd-ports-gnome-3a16d7d5872e02a8c1950844cbf66fb6f1947df5.tar.gz
freebsd-ports-gnome-3a16d7d5872e02a8c1950844cbf66fb6f1947df5.tar.zst
freebsd-ports-gnome-3a16d7d5872e02a8c1950844cbf66fb6f1947df5.zip
security/heimdal: Fix build when EGD is not available (e.g. LibreSSL)
Approved by: SSL blanket
Diffstat (limited to 'security')
-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