From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Raghav Gururajan" Subject: bug#34861: TLS Error with Flatpak Date: Sat, 23 Mar 2019 04:02:25 +0000 Message-ID: <1b38d1aece009c4dc9321811abeea14d@disroot.org> References: <87mulm4obc.fsf@gnu.org> <87d0mnn282.fsf@elephly.net> <87ef73yiyr.fsf@elephly.net> <87imwgpl5e.fsf@gnu.org> <002a84964102ac2171089fa7dc007092@disroot.org> <2d04774df83fe600777de7b8f26aca87@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:58127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Y6m-0007pJ-6J for bug-guix@gnu.org; Sat, 23 Mar 2019 00:18:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7Xs6-0000z8-LS for bug-guix@gnu.org; Sat, 23 Mar 2019 00:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7Xs6-0000z3-Ar for bug-guix@gnu.org; Sat, 23 Mar 2019 00:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h7Xs6-0002g9-2a for bug-guix@gnu.org; Sat, 23 Mar 2019 00:03:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87mulm4obc.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 34861@debbugs.gnu.org Thank you very much.=0A=0AShould I be running just "export GIO_USE_TLS=3D= tls" as it is mentioned or should I insert it in some other command/synta= x?=0A=0AThanks!=0A=0ARegards,=0ARG.=0A=0AMarch 22, 2019 5:15 PM, "Ludovic= Court=C3=A8s" wrote:=0A=0A> Hi Raghav,=0A> =0A> "Raghav G= ururajan" skribis:=0A> =0A>> Please find the log at:= =0A>> https://bin.disroot.org/?597e32cb7e42e40e#r9lqwZ6w7sIAWlY2mt6dsgKCK= RO5q0ZVt9U69vnZVZs=3D=0A>> =0A>> 5462 connect(12, {sa_family=3DAF_INET, s= in_port=3Dhtons(443), sin_addr=3Dinet_addr("93.93.130.103")}, 16)=0A>> = =3D -1 EINPROGRESS (Operation now in progress)=0A> =0A> [...]=0A> =0A>> 5= 462 getsockopt(12, SOL_SOCKET, SO_ERROR, [0], [4]) =3D 0=0A>> 5462 setsoc= kopt(12, SOL_TCP, TCP_NODELAY, [1], 4) =3D 0=0A> =0A> [...]=0A> =0A>> 546= 2 close(12) =3D 0=0A> =0A> [...]=0A> =0A>> 5461 write(2, "\33[31m\33[1mer= ror: \33[22m\33[0mTLS support is not available\n", 54) =3D 54=0A> =0A> Th= anks for sending the strace output. That output shows that Flatpak=0A> ne= ver tries to access /etc/ssl/certs, ~/.guix-profile/etc/ssl/certs or=0A> = anything like that.=0A> =0A> The error message comes from GLib, in gdummy= tlsbackend.c. AFAICS our=0A> GLib also includes the TLS (not dummy) backe= nd:=0A> =0A> --8<---------------cut here---------------start-------------= >8---=0A> $ objdump -T /gnu/store/0q9pq9flr76rh4bv2524niknknnl2kvq-glib-2= .56.3/lib/libgio-2.0.so | grep=0A> g_tls_backend=0A> 0000000000093e90 g D= F .text 0000000000000082 Base g_tls_backend_get_default_database=0A> 0000= 000000093dd0 g DF .text 000000000000006f Base g_tls_backend_supports_tls= =0A> 0000000000093f40 g DF .text 000000000000001b Base g_tls_backend_get_= client_connection_type=0A> 0000000000093e40 g DF .text 0000000000000049 B= ase g_tls_backend_supports_dtls=0A> 0000000000093db0 g DF .text 000000000= 0000015 Base g_tls_backend_get_default=0A> 0000000000093f80 g DF .text 00= 00000000000072 Base g_tls_backend_get_dtls_client_connection_type=0A> 000= 0000000093f60 g DF .text 000000000000001b Base g_tls_backend_get_server_c= onnection_type=0A> 0000000000094000 g DF .text 0000000000000072 Base g_tl= s_backend_get_dtls_server_connection_type=0A> 0000000000094080 g DF .text= 000000000000007f Base g_tls_backend_get_file_database_type=0A> 000000000= 0093d20 g DF .text 0000000000000084 Base g_tls_backend_get_type=0A> 00000= 00000093f20 g DF .text 000000000000001b Base g_tls_backend_get_certificat= e_type=0A> --8<---------------cut here---------------end--------------->8= ---=0A> =0A> Libsoup does this:=0A> =0A> --8<---------------cut here-----= ----------start------------->8---=0A> static gboolean=0A> soup_socket_set= up_ssl (SoupSocket *sock,=0A> const char *ssl_host,=0A> GCancellable *can= cellable,=0A> GError **error)=0A> {=0A> SoupSocketPrivate *priv =3D soup_= socket_get_instance_private (sock);=0A> GTlsBackend *backend =3D g_tls_ba= ckend_get_default ();=0A> --8<---------------cut here---------------end--= ------------->8---=0A> =0A> =E2=80=98g_tls_backend_get_default=E2=80=99 i= tself looks like this:=0A> =0A> --8<---------------cut here--------------= -start------------->8---=0A> GTlsBackend *=0A> g_tls_backend_get_default = (void)=0A> {=0A> return _g_io_module_get_default (G_TLS_BACKEND_EXTENSION= _POINT_NAME,=0A> "GIO_USE_TLS", NULL);=0A> }=0A> --8<---------------cut h= ere---------------end--------------->8---=0A> =0A> Could you try setting = the =E2=80=98GIO_USE_TLS=E2=80=99 environment variable? Like:=0A> =0A> ex= port GIO_USE_TLS=3Dtls=0A> =0A> or maybe:=0A> =0A> export GIO_USE_TLS=3DG= TlsBackend=0A> =0A> and then run Flatpak in that environment?=0A> =0A> TI= A,=0A> Ludo=E2=80=99.