$OpenBSD: patch-lib_tls_tls_c,v 1.2 2016/03/06 12:17:40 ajacoutot Exp $

Fix build with GnuTLS 3.4.

--- lib/tls/tls.c.orig	Wed Jul 30 21:44:55 2008
+++ lib/tls/tls.c	Sat Mar  5 15:24:04 2016
@@ -505,7 +505,6 @@ struct socket_context *tls_init_server(struct tls_para
 	gnutls_transport_set_ptr(tls->session, (gnutls_transport_ptr)tls);
 	gnutls_transport_set_pull_function(tls->session, (gnutls_pull_func)tls_pull);
 	gnutls_transport_set_push_function(tls->session, (gnutls_push_func)tls_push);
-	gnutls_transport_set_lowat(tls->session, 0);
 
 	tls->plain_chars = plain_chars;
 	if (plain_chars) {
@@ -576,7 +575,7 @@ struct socket_context *tls_init_client(struct socket_c
 	talloc_free(cafile);
 	TLSCHECK(gnutls_init(&tls->session, GNUTLS_CLIENT));
 	TLSCHECK(gnutls_set_default_priority(tls->session));
-	gnutls_certificate_type_set_priority(tls->session, cert_type_priority);
+	gnutls_priority_set_direct(tls->session, "NORMAL:+CTYPE-OPENPGP", NULL);
 	TLSCHECK(gnutls_credentials_set(tls->session, GNUTLS_CRD_CERTIFICATE, tls->xcred));
 
 	talloc_set_destructor(tls, tls_destructor);
@@ -584,7 +583,6 @@ struct socket_context *tls_init_client(struct socket_c
 	gnutls_transport_set_ptr(tls->session, (gnutls_transport_ptr)tls);
 	gnutls_transport_set_pull_function(tls->session, (gnutls_pull_func)tls_pull);
 	gnutls_transport_set_push_function(tls->session, (gnutls_push_func)tls_push);
-	gnutls_transport_set_lowat(tls->session, 0);
 	tls->tls_detect = False;
 
 	tls->output_pending  = False;
