void-packages/srcpkgs/sylpheed/patches/libsylph_ssl_c.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

20 lines
574 B
Diff

See https://sylpheed.sraoss.jp/redmine/issues/306
Patch is necessary both on LibreSSL and OpenSSL
--- a/libsylph/ssl.c
+++ b/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);