* [v3 1/2] gnu: w3m: Update patch to use '-p1'. @ 2016-01-06 2:04 Leo Famulari 2016-01-06 2:05 ` [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers Leo Famulari ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Leo Famulari @ 2016-01-06 2:04 UTC (permalink / raw) To: guix-devel * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. --- gnu/packages/patches/w3m-fix-compile.patch | 24 ++++++++++++++++++------ gnu/packages/w3m.scm | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gnu/packages/patches/w3m-fix-compile.patch b/gnu/packages/patches/w3m-fix-compile.patch index 5604052..33e7486 100644 --- a/gnu/packages/patches/w3m-fix-compile.patch +++ b/gnu/packages/patches/w3m-fix-compile.patch @@ -1,15 +1,27 @@ +From 371f256f5f300b01be228a6fd95884ea475965fc Mon Sep 17 00:00:00 2001 +From: Leo Famulari <leo@famulari.name> +Date: Tue, 5 Jan 2016 16:57:29 -0500 +Subject: [PATCH 1/4] fix compile + https://bugs.archlinux.org/task/33397 +--- + main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -diff -aur old/main.c new/main.c ---- main.c 2013-01-14 18:16:14.216210053 -0600 -+++ main.c 2013-01-14 18:17:28.816220559 -0600 -@@ -833,7 +833,8 @@ +diff --git a/main.c b/main.c +index b421943..249eb1a 100644 +--- a/main.c ++++ b/main.c +@@ -833,7 +833,8 @@ main(int argc, char **argv, char **envp) mySignal(SIGPIPE, SigPipe); #endif - + - orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); + orig_GC_warn_proc = GC_get_warn_proc(); + GC_set_warn_proc(wrap_GC_warn_proc); err_msg = Strnew(); if (load_argc == 0) { - /* no URL specified */ + /* no URL specified */ +-- +2.6.4 + diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm index d114d0a..627447b 100644 --- a/gnu/packages/w3m.scm +++ b/gnu/packages/w3m.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> +;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,7 +45,6 @@ ;; cf. https://bugs.archlinux.org/task/33397 (patches (list (search-patch "w3m-fix-compile.patch"))) - (patch-flags '("-p0")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target #:phases (alist-cons-before -- 2.6.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers. 2016-01-06 2:04 [v3 1/2] gnu: w3m: Update patch to use '-p1' Leo Famulari @ 2016-01-06 2:05 ` Leo Famulari 2016-01-06 10:52 ` Ludovic Courtès 2016-01-06 10:33 ` [v3 1/2] gnu: w3m: Update patch to use '-p1' Ludovic Courtès 2016-01-06 10:33 ` Ludovic Courtès 2 siblings, 1 reply; 10+ messages in thread From: Leo Famulari @ 2016-01-06 2:05 UTC (permalink / raw) To: guix-devel * gnu/packages/patches/w3m-force-ssl_verify_server-on.patch: New file. * gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch: New file. * gnu/packages/patches/w3m-disable-weak-ciphers.patch: New file. * gnu/packages/w3m.scm (w3m)[source]: Add patches. * gnu-system.am (dist_patch_DATA): Add the new files. --- gnu-system.am | 3 +++ .../patches/w3m-disable-sslv2-and-sslv3.patch | 27 ++++++++++++++++++++++ .../patches/w3m-disable-weak-ciphers.patch | 27 ++++++++++++++++++++++ .../patches/w3m-force-ssl_verify_server-on.patch | 27 ++++++++++++++++++++++ gnu/packages/w3m.scm | 5 +++- 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch create mode 100644 gnu/packages/patches/w3m-disable-weak-ciphers.patch create mode 100644 gnu/packages/patches/w3m-force-ssl_verify_server-on.patch diff --git a/gnu-system.am b/gnu-system.am index 3dd49fe..ea1dfda 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -699,6 +699,9 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-fix-compile.patch \ + gnu/packages/patches/w3m-force-ssl_verify_server-on.patch \ + gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch \ + gnu/packages/patches/w3m-disable-weak-ciphers.patch \ gnu/packages/patches/webkitgtk-2.4-sql-init-string.patch \ gnu/packages/patches/weechat-python.patch \ gnu/packages/patches/weex-vacopy.patch \ diff --git a/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch b/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch new file mode 100644 index 0000000..31f53be --- /dev/null +++ b/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch @@ -0,0 +1,27 @@ +From 7b8d2dbc41b6bdab09e2e632e8481f6e8b585a42 Mon Sep 17 00:00:00 2001 +From: Leo Famulari <leo@famulari.name> +Date: Tue, 5 Jan 2016 17:15:33 -0500 +Subject: [PATCH 3/4] Disable SSLv2 and SSLv3. + +The only remaining methods are TLSv1.* (the code never distinguishes +between TLSv1.0, TLSv1.1, and TLSv1.2). +--- + fm.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fm.h b/fm.h +index 320906c..ddcd4fc 100644 +--- a/fm.h ++++ b/fm.h +@@ -1144,7 +1144,7 @@ global int ssl_path_modified init(FALSE); + #endif /* defined(USE_SSL) && + * defined(USE_SSL_VERIFY) */ + #ifdef USE_SSL +-global char *ssl_forbid_method init(NULL); ++global char *ssl_forbid_method init("2, 3"); + #endif + + global int is_redisplay init(FALSE); +-- +2.6.4 + diff --git a/gnu/packages/patches/w3m-disable-weak-ciphers.patch b/gnu/packages/patches/w3m-disable-weak-ciphers.patch new file mode 100644 index 0000000..35261ab --- /dev/null +++ b/gnu/packages/patches/w3m-disable-weak-ciphers.patch @@ -0,0 +1,27 @@ +From a5f64e1647c746f15c7a9a122d0cbf235b3c4c54 Mon Sep 17 00:00:00 2001 +From: Leo Famulari <leo@famulari.name> +Date: Tue, 5 Jan 2016 18:24:33 -0500 +Subject: [PATCH 4/4] Disable weak ciphers + +Disable RC4, "export ciphers", and all keys < 128 bits. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/1325674 +--- + url.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/url.c b/url.c +index ed6062e..e86b1f3 100644 +--- a/url.c ++++ b/url.c +@@ -326,6 +326,7 @@ openSSLHandle(int sock, char *hostname, char **p_cert) + SSL_load_error_strings(); + if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method()))) + goto eend; ++ SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP"); + option = SSL_OP_ALL; + if (ssl_forbid_method) { + if (strchr(ssl_forbid_method, '2')) +-- +2.6.4 + diff --git a/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch b/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch new file mode 100644 index 0000000..726c548 --- /dev/null +++ b/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch @@ -0,0 +1,27 @@ +From 760bfc04b5b86441d13c77e0306e315907544b64 Mon Sep 17 00:00:00 2001 +From: Leo Famulari <leo@famulari.name> +Date: Tue, 5 Jan 2016 17:15:18 -0500 +Subject: [PATCH 2/4] Force ssl_verify_server on. + +By default, SSL/TLS certificates are not verified. This enables the +verification. +--- + fm.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fm.h b/fm.h +index 8378939..320906c 100644 +--- a/fm.h ++++ b/fm.h +@@ -1135,7 +1135,7 @@ global int view_unseenobject init(TRUE); + #endif + + #if defined(USE_SSL) && defined(USE_SSL_VERIFY) +-global int ssl_verify_server init(FALSE); ++global int ssl_verify_server init(TRUE); + global char *ssl_cert_file init(NULL); + global char *ssl_key_file init(NULL); + global char *ssl_ca_path init(NULL); +-- +2.6.4 + diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm index 627447b..36e11a6 100644 --- a/gnu/packages/w3m.scm +++ b/gnu/packages/w3m.scm @@ -44,7 +44,10 @@ "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")) ;; cf. https://bugs.archlinux.org/task/33397 - (patches (list (search-patch "w3m-fix-compile.patch"))) + (patches (list (search-patch "w3m-fix-compile.patch") + (search-patch "w3m-force-ssl_verify_server-on.patch") + (search-patch "w3m-disable-sslv2-and-sslv3.patch") + (search-patch "w3m-disable-weak-ciphers.patch"))))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target #:phases (alist-cons-before -- 2.6.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers. 2016-01-06 2:05 ` [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers Leo Famulari @ 2016-01-06 10:52 ` Ludovic Courtès 2016-01-07 7:37 ` Leo Famulari 0 siblings, 1 reply; 10+ messages in thread From: Ludovic Courtès @ 2016-01-06 10:52 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> skribis: > * gnu/packages/patches/w3m-force-ssl_verify_server-on.patch: New file. > * gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch: New file. > * gnu/packages/patches/w3m-disable-weak-ciphers.patch: New file. > * gnu/packages/w3m.scm (w3m)[source]: Add patches. > * gnu-system.am (dist_patch_DATA): Add the new files. Please add: Fixes <http://bugs.gnu.org/16791>. > +From 7b8d2dbc41b6bdab09e2e632e8481f6e8b585a42 Mon Sep 17 00:00:00 2001 > +From: Leo Famulari <leo@famulari.name> > +Date: Tue, 5 Jan 2016 17:15:33 -0500 > +Subject: [PATCH 3/4] Disable SSLv2 and SSLv3. I would remove the Git header from the patches (since they are from a local repository I guess?) and keep only the subject line and description. Otherwise LGTM! Thanks for working on one of the oldest bug reports. :-) Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers. 2016-01-06 10:52 ` Ludovic Courtès @ 2016-01-07 7:37 ` Leo Famulari 0 siblings, 0 replies; 10+ messages in thread From: Leo Famulari @ 2016-01-07 7:37 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Wed, Jan 06, 2016 at 11:52:07AM +0100, Ludovic Courtès wrote: > Leo Famulari <leo@famulari.name> skribis: > > > * gnu/packages/patches/w3m-force-ssl_verify_server-on.patch: New file. > > * gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch: New file. > > * gnu/packages/patches/w3m-disable-weak-ciphers.patch: New file. > > * gnu/packages/w3m.scm (w3m)[source]: Add patches. > > * gnu-system.am (dist_patch_DATA): Add the new files. > > Please add: > > Fixes <http://bugs.gnu.org/16791>. Done. > > > +From 7b8d2dbc41b6bdab09e2e632e8481f6e8b585a42 Mon Sep 17 00:00:00 2001 > > +From: Leo Famulari <leo@famulari.name> > > +Date: Tue, 5 Jan 2016 17:15:33 -0500 > > +Subject: [PATCH 3/4] Disable SSLv2 and SSLv3. > > I would remove the Git header from the patches (since they are from a > local repository I guess?) and keep only the subject line and > description. Done. > > Otherwise LGTM! Pushed with the requested changes as e6352001c4 and 62339e2d49. > > Thanks for working on one of the oldest bug reports. :-) > > Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-06 2:04 [v3 1/2] gnu: w3m: Update patch to use '-p1' Leo Famulari 2016-01-06 2:05 ` [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers Leo Famulari @ 2016-01-06 10:33 ` Ludovic Courtès 2016-01-07 7:30 ` Leo Famulari 2016-01-06 10:33 ` Ludovic Courtès 2 siblings, 1 reply; 10+ messages in thread From: Ludovic Courtès @ 2016-01-06 10:33 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> skribis: > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. I would rename the patch to, say, ‘w3m-libgc.patch’, for clarity. > --- a/gnu/packages/patches/w3m-fix-compile.patch > +++ b/gnu/packages/patches/w3m-fix-compile.patch > @@ -1,15 +1,27 @@ > +From 371f256f5f300b01be228a6fd95884ea475965fc Mon Sep 17 00:00:00 2001 > +From: Leo Famulari <leo@famulari.name> > +Date: Tue, 5 Jan 2016 16:57:29 -0500 > +Subject: [PATCH 1/4] fix compile > + > https://bugs.archlinux.org/task/33397 Could you remove the Git header and write something like: This patch fixes w3m compilation with libgc > X.Y. (If I understand correctly what it does.) However, I’m surprised this is needed since libgc hasn’t changed lately? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-06 10:33 ` [v3 1/2] gnu: w3m: Update patch to use '-p1' Ludovic Courtès @ 2016-01-07 7:30 ` Leo Famulari 2016-01-10 20:36 ` Ludovic Courtès 0 siblings, 1 reply; 10+ messages in thread From: Leo Famulari @ 2016-01-07 7:30 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Wed, Jan 06, 2016 at 11:33:28AM +0100, Ludovic Courtès wrote: > Leo Famulari <leo@famulari.name> skribis: > > > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. > > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. > > I would rename the patch to, say, ‘w3m-libgc.patch’, for clarity. > > > --- a/gnu/packages/patches/w3m-fix-compile.patch > > +++ b/gnu/packages/patches/w3m-fix-compile.patch > > @@ -1,15 +1,27 @@ > > +From 371f256f5f300b01be228a6fd95884ea475965fc Mon Sep 17 00:00:00 2001 > > +From: Leo Famulari <leo@famulari.name> > > +Date: Tue, 5 Jan 2016 16:57:29 -0500 > > +Subject: [PATCH 1/4] fix compile > > + > > https://bugs.archlinux.org/task/33397 > > Could you remove the Git header and write something like: > > This patch fixes w3m compilation with libgc > X.Y. > > (If I understand correctly what it does.) Done. > > However, I’m surprised this is needed since libgc hasn’t changed lately? It's for libgc-7.2, released 2012-05-11. You may also notice the substitution of "file_handle" in w3m's package definition. That's because glibc decided to start using the identifier "file_handle" in 2011 [0]. The problem was reported to w3m on the last day of 2011 [1]. It was patched in the distros in 2012 but nothing from upstream. [0] http://repo.or.cz/w/glibc.git/commitdiff/158648c0bdda281e252a27c0200dd0ea6f4e0215 [1] http://sourceforge.net/p/w3m/patches/58/ > > Thanks, > Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-07 7:30 ` Leo Famulari @ 2016-01-10 20:36 ` Ludovic Courtès 0 siblings, 0 replies; 10+ messages in thread From: Ludovic Courtès @ 2016-01-10 20:36 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> skribis: > On Wed, Jan 06, 2016 at 11:33:28AM +0100, Ludovic Courtès wrote: >> Leo Famulari <leo@famulari.name> skribis: >> >> > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. >> > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. >> >> I would rename the patch to, say, ‘w3m-libgc.patch’, for clarity. >> >> > --- a/gnu/packages/patches/w3m-fix-compile.patch >> > +++ b/gnu/packages/patches/w3m-fix-compile.patch >> > @@ -1,15 +1,27 @@ >> > +From 371f256f5f300b01be228a6fd95884ea475965fc Mon Sep 17 00:00:00 2001 >> > +From: Leo Famulari <leo@famulari.name> >> > +Date: Tue, 5 Jan 2016 16:57:29 -0500 >> > +Subject: [PATCH 1/4] fix compile >> > + >> > https://bugs.archlinux.org/task/33397 >> >> Could you remove the Git header and write something like: >> >> This patch fixes w3m compilation with libgc > X.Y. >> >> (If I understand correctly what it does.) > > Done. > >> >> However, I’m surprised this is needed since libgc hasn’t changed lately? > > It's for libgc-7.2, released 2012-05-11. > > You may also notice the substitution of "file_handle" in w3m's package > definition. That's because glibc decided to start using the identifier > "file_handle" in 2011 [0]. The problem was reported to w3m on the last > day of 2011 [1]. It was patched in the distros in 2012 but nothing from > upstream. OK. Thanks for the explanation. Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-06 2:04 [v3 1/2] gnu: w3m: Update patch to use '-p1' Leo Famulari 2016-01-06 2:05 ` [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers Leo Famulari 2016-01-06 10:33 ` [v3 1/2] gnu: w3m: Update patch to use '-p1' Ludovic Courtès @ 2016-01-06 10:33 ` Ludovic Courtès 2016-01-07 7:30 ` Leo Famulari 2 siblings, 1 reply; 10+ messages in thread From: Ludovic Courtès @ 2016-01-06 10:33 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> skribis: > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. I forgot: please add the patch to gnu-system.am. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-06 10:33 ` Ludovic Courtès @ 2016-01-07 7:30 ` Leo Famulari 2016-01-10 20:34 ` Ludovic Courtès 0 siblings, 1 reply; 10+ messages in thread From: Leo Famulari @ 2016-01-07 7:30 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Wed, Jan 06, 2016 at 11:33:55AM +0100, Ludovic Courtès wrote: > Leo Famulari <leo@famulari.name> skribis: > > > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. > > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. > > I forgot: please add the patch to gnu-system.am. This patch was already there. I just adjusted (and now, renamed) the patch prefix level from '-p0' to '-p1'. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v3 1/2] gnu: w3m: Update patch to use '-p1'. 2016-01-07 7:30 ` Leo Famulari @ 2016-01-10 20:34 ` Ludovic Courtès 0 siblings, 0 replies; 10+ messages in thread From: Ludovic Courtès @ 2016-01-10 20:34 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> skribis: > On Wed, Jan 06, 2016 at 11:33:55AM +0100, Ludovic Courtès wrote: >> Leo Famulari <leo@famulari.name> skribis: >> >> > * gnu/packages/patches/w3m-fix-compile.patch: Update to work with -p1. >> > * gnu/packages/w3m.scm (w3m): Drop patch flag -p0. >> >> I forgot: please add the patch to gnu-system.am. > > This patch was already there. I just adjusted (and now, renamed) the > patch prefix level from '-p0' to '-p1'. Oh I see, sorry for the confusion. Ludo’. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-01-10 20:36 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-06 2:04 [v3 1/2] gnu: w3m: Update patch to use '-p1' Leo Famulari 2016-01-06 2:05 ` [v3 2/2] gnu: w3m: Enable SSL, disable broken protocols and ciphers Leo Famulari 2016-01-06 10:52 ` Ludovic Courtès 2016-01-07 7:37 ` Leo Famulari 2016-01-06 10:33 ` [v3 1/2] gnu: w3m: Update patch to use '-p1' Ludovic Courtès 2016-01-07 7:30 ` Leo Famulari 2016-01-10 20:36 ` Ludovic Courtès 2016-01-06 10:33 ` Ludovic Courtès 2016-01-07 7:30 ` Leo Famulari 2016-01-10 20:34 ` Ludovic Courtès
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.