fix bug 4346, 'Error: Certificate is for invalid2.invalid, but connection is to imap.gmail.com'

patch by Alphonse
This commit is contained in:
paul 2022-03-07 17:52:23 +00:00 committed by Paul
parent ea407c21bb
commit 115af738f9

View file

@ -247,6 +247,7 @@ int oauth2_obtain_tokens (Oauth2Service provider, OAUTH2Data *OAUTH2Data, const
return (1);
}
sock->ssl_cert_auto_accept = TRUE;
sock->use_tls_sni = TRUE;
sock_set_nonblocking_mode(sock, FALSE);
sock_set_io_timeout(10);
sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1";
@ -398,6 +399,7 @@ gint oauth2_use_refresh_token (Oauth2Service provider, OAUTH2Data *OAUTH2Data)
return (1);
}
sock->ssl_cert_auto_accept = TRUE;
sock->use_tls_sni = TRUE;
sock_set_nonblocking_mode(sock, FALSE);
sock_set_io_timeout(10);
sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1";