talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8287ec1b254dd5b645858a0f7780080465f208f8
parent 15c3f52d7f10144a379babe784d7517204e38a13
Author: Michael Rasmussen <mir@datanom.net>
Date:   Mon, 17 Oct 2022 23:37:50 +0200

Use define for gnutls-priority instead of hard coded string

Signed-off-by: Michael Rasmussen <mir@datanom.net>

Diffstat:
Msrc/oauth2.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/oauth2.c b/src/oauth2.c @@ -43,6 +43,7 @@ #include "common/passcrypt.h" #include "prefs_common.h" +#define GNUTLS_PRIORITY "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1" //Yahoo requires token requests to send POST header Authorization: Basic //where the password is Base64 encoding of client_id:client_secret @@ -255,7 +256,7 @@ int oauth2_obtain_tokens (Oauth2Service provider, OAUTH2Data *OAUTH2Data, const gint timeout_secs = prefs_common_get_prefs()->io_timeout_secs; debug_print("Socket timeout: %i sec(s)\n", timeout_secs); sock_set_io_timeout(timeout_secs); - sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1"; + sock->gnutls_priority = GNUTLS_PRIORITY; if (ssl_init_socket(sock) == FALSE) { log_message(LOG_PROTOCOL, _("OAuth2 TLS connection error\n")); g_free(token); @@ -397,7 +398,7 @@ gint oauth2_use_refresh_token (Oauth2Service provider, OAUTH2Data *OAUTH2Data) gint timeout_secs = prefs_common_get_prefs()->io_timeout_secs; debug_print("Socket timeout: %i sec(s)\n", timeout_secs); sock_set_io_timeout(timeout_secs); - sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1"; + sock->gnutls_priority = GNUTLS_PRIORITY; if (ssl_init_socket(sock) == FALSE) { log_message(LOG_PROTOCOL, _("OAuth2 TLS connection error\n")); return (1);