ports/sysutils/heartbeat/files/patch-lib-mgmt-mgmt_tls_lib.c
Tijl Coosemans 6bc6f3a9e0 - Update security/gnutls to 3.4.10.
- Rename the LIBDANE option DANE because that's the name of the protocol
  supported by libgnutls-dane and gnutls-cli.  Also clarify the option
  description.
- Add an IDN option.
- libgnutls-openssl has been removed in 3.4.  Some ports used this library
  in their LIB_DEPENDS but no port actually required it.
- Some old API functions have been removed.  Ports that used these have been
  updated or patched to use the new API.
- Add a patch to print/cups to prevent overlinking of libgnutls.so.
- Bump PORTREVISION on dependent ports.

net-im/jabber: This port used the old API to give users fine grained
control over which crypto algorithms were used via a configuration file.
It's not immediately obvious how to port this to the new API so the port
always uses the defaults now.

www/hydra: Mark BROKEN.  This uses more removed calls than the other ports,
is said to be alpha quality and not fully functional and has been abandoned
10 years ago.

PR:		207768
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-03-27 14:57:59 +00:00

34 lines
1.4 KiB
C

--- lib/mgmt/mgmt_tls_lib.c.orig 2008-08-18 12:32:19 UTC
+++ lib/mgmt/mgmt_tls_lib.c
@@ -38,11 +38,6 @@ static gnutls_dh_params dh_params;
gnutls_anon_server_credentials anoncred_server;
gnutls_anon_client_credentials anoncred_client;
-const int kx_prio[] =
-{
- GNUTLS_KX_ANON_DH,
- 0
-};
int
tls_init_client(void)
@@ -58,8 +53,7 @@ tls_attach_client(int sock)
int ret;
gnutls_session* session = (gnutls_session*)gnutls_malloc(sizeof(gnutls_session));
gnutls_init(session, GNUTLS_CLIENT);
- gnutls_set_default_priority(*session);
- gnutls_kx_set_priority (*session, kx_prio);
+ gnutls_priority_set_direct(*session, "NORMAL:-KX-ALL:+ANON-DH", NULL);
gnutls_credentials_set(*session, GNUTLS_CRD_ANON, anoncred_client);
gnutls_transport_set_ptr(*session, (gnutls_transport_ptr) GINT_TO_POINTER(sock));
ret = gnutls_handshake(*session);
@@ -131,8 +125,7 @@ tls_attach_server(int sock)
int ret;
gnutls_session* session = (gnutls_session*)gnutls_malloc(sizeof(gnutls_session));
gnutls_init(session, GNUTLS_SERVER);
- gnutls_set_default_priority(*session);
- gnutls_kx_set_priority (*session, kx_prio);
+ gnutls_priority_set_direct(*session, "NORMAL:-KX-ALL:+ANON-DH", NULL);
gnutls_credentials_set(*session, GNUTLS_CRD_ANON, anoncred_server);
gnutls_dh_set_prime_bits(*session, DH_BITS);
gnutls_transport_set_ptr(*session, (gnutls_transport_ptr) GINT_TO_POINTER(sock));