From 9f7ef8fa5c5216ac2510d2b4acb3b1b5c26886d1 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 12 Aug 2013 15:17:02 +0200 Subject: [PATCH] Set GnuTLS priority string with new constant PROXY_TLS_PRIORITIES. Same behaviour, "NORMAL" is still used. --- src/tlsproxy.c | 3 ++- src/tlsproxy.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tlsproxy.c b/src/tlsproxy.c index 7745930..751c860 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -413,7 +413,8 @@ static void initialize_gnutls(void) { #endif /* Setup GnuTLS cipher suites. */ - result = gnutls_priority_init(&global_tls_priority_cache, "NORMAL", NULL); + result = gnutls_priority_init(&global_tls_priority_cache, + PROXY_TLS_PRIORITIES, NULL); GNUTLS_ERROR_EXIT(result, "gnutls_priority_init()"); /* Read Diffie-Hellman parameters. */ diff --git a/src/tlsproxy.h b/src/tlsproxy.h index f93be46..fae7d60 100644 --- a/src/tlsproxy.h +++ b/src/tlsproxy.h @@ -30,6 +30,7 @@ #include "log.h" + /* Length for path arrays. */ #define TLSPROXY_MAX_PATH_LENGTH 1024 @@ -49,6 +50,9 @@ * certificate. */ #define STORED_SERVER_CERT_FILE_FORMAT "./certificate-%s-server.pem" +/* GnuTLS priority string used for both server and client connections. */ +#define PROXY_TLS_PRIORITIES "NORMAL" + /* Proxy hostname and port if specified on the command line. */ char *global_proxy_host; -- 2.45.2