Use SNI; fixes TLSv1.3 to imap.gmail.com

ok kn@ tb@ sthen@
"go ahead" Amit Kulkarni (maintainer)
This commit is contained in:
gkoehler
2020-01-27 21:05:19 +00:00
parent f82ebac1a6
commit 08e46f6776
2 changed files with 26 additions and 2 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.125 2019/07/12 20:47:38 sthen Exp $
# $OpenBSD: Makefile,v 1.126 2020/01/27 21:05:19 gkoehler Exp $
COMMENT = lightweight and user-friendly e-mail client
DISTNAME = sylpheed-3.7.0
REVISION = 4
REVISION = 5
SHARED_LIBS += sylph-0 4.1 # 4.0
SHARED_LIBS += sylpheed-plugin-0 4.0 # 4.0
@@ -0,0 +1,24 @@
$OpenBSD: patch-libsylph_ssl_c,v 1.4 2020/01/27 21:05:19 gkoehler Exp $
Use SNI; fixes TLSv1.3 to imap.gmail.com.
Patch from Antonio Ospite,
https://sylpheed.sraoss.jp/redmine/issues/306#note-3
but with the addition of an error check.
Index: libsylph/ssl.c
--- libsylph/ssl.c.orig
+++ libsylph/ssl.c
@@ -258,6 +258,13 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinf
return FALSE;
}
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ if (!SSL_set_tlsext_host_name(sockinfo->ssl, sockinfo->hostname)) {
+ g_warning("Error setting servername extension\n");
+ return FALSE;
+ }
+#endif
+
SSL_set_fd(sockinfo->ssl, sockinfo->sock);
while ((ret = SSL_connect(sockinfo->ssl)) != 1) {
err = SSL_get_error(sockinfo->ssl, ret);