After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794425 - [souphttpsrc] TLS/SSL support not available on Win32
[souphttpsrc] TLS/SSL support not available on Win32
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
2.x
Other Windows
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-17 13:25 UTC by Tao
Modified: 2018-11-03 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tao 2018-03-17 13:25:45 UTC
Hello,

It's my first bug report on gnome, so please don't blame me. This bug report is a followup of https://github.com/ua-i2cat/gst-unity-bridge/issues/36

My goal is to play live HLS stream in unity, for this I use GStreamer Unity3D Bridge. This library obviously rely on GStreamer. But gstreamer looks to be unable to perform an HTTPS request with following message: 
souphttpsrc gstsouphttpsrc.c:1279:gst_soup_http_src_parse_status:<souphttpsrc2> error: TLS/SSL support not available; install glib-networking (6), URL: https://protectedurl/forthisbugreport, Redirect to: (NULL)

The old discussion on gstreamer dev mailing list http://gstreamer-devel.966125.n4.nabble.com/Queries-about-libgstsouphttpsrc-td4667605.html suggests to simply add libgiognutls.dll to my project, but it did not fix my problem. Notice I also tried to put libgiognutls.dll in windows system32 dir.

This bug is reproducible with GStreamer 1.13.91.

Kind regards,

Laurent.
Comment 1 Sebastian Dröge (slomo) 2018-03-18 08:34:49 UTC
From where did you get GStreamer (and GLib, glib-networking, etc) or did you build it yourself? You need libgiognutls.dll (or an alternative around OpenSSL[0] or SChannel[1]), and it has to be placed in the GIO module directory. The GIO module directory can also be configured via the GIO_MODULE_DIR environment variable.


[0] https://github.com/GNOME/glib-openssl
[1] https://github.com/centricular/glib-schannel
Comment 2 Tao 2018-03-18 19:42:38 UTC
I downloaded gstreamer from https://gstreamer.freedesktop.org/data/pkg/windows/1.13.91/gstreamer-1.0-x86_64-1.13.91.msi and installed it in default directory: C:\gstreamer
Then I put GIO_MODULE_DIR and GIO_EXTRA_MODULES environment variables to C:\gstreamer\1.0\x86_64\lib\gio\modules
I am also copying libgiognutls.dll and others gstreamer dlls to my unity project, but same error happens.

Finally I workaround this behaviour by using glib-networking from cygwin: cyggiognutls.dll but I still have an error complaining this time about TLS certificate not acceptable:

0:00:00.440859270 000001F14E023880 WRN souphttpsrc gstsouphttpsrc.c:1377:gst_soup_http_src_parse_status:<souphttpsrc2> error: Secure connection setup failed.
0:00:00.440934730 000001F14E023880 WRN souphttpsrc gstsouphttpsrc.c:1377:gst_soup_http_src_parse_status:<souphttpsrc2> error: Unacceptable TLS certificate (6), URL: https://protectedurl/forthisbugreport, Redirect to: (NULL)
0:00:00.440977750 000001F14E023880 WRN uridownloader gsturidownloader.c:242:gst_uri_downloader_bus_handler:<uridownloader0> Received error: Secure connection setup failed. from souphttpsrc2, the download will be cancelled
0:00:00.441015480 000001F14E023880 WRN basesrc gstbasesrc.c:3055:gst_base_src_loop:<souphttpsrc2> error: Internal data stream error.
0:00:00.441030995 000001F14E023880 WRN basesrc gstbasesrc.c:3055:gst_base_src_loop:<souphttpsrc2> error: streaming stopped, reason error (-5)
0:00:00.441126907 000001F14E023C00 WRN hlsdemux gsthlsdemux.c:717:gst_hls_demux_get_key:<hlsdemux0> Failed to download key to decrypt data: Secure connection setup failed.: gstsouphttpsrc.c(1377): gst_soup_http_src_parse_status (): /GstSoupHTTPSrc:souphttpsrc2:
Unacceptable TLS certificate (6), URL: https://protectedurl/forthisbugreport, Redirect to: (NULL)

But I am doubtful about this unacceptable TLS certificate error message because chrome and firefox have no problem with this url. Unfortunately I am relunctant to  exhibit this url in this bugreport. But I am writing you a private email to share it.
Comment 3 Sebastian Dröge (slomo) 2018-03-19 08:46:57 UTC
The cygwin GIO module probably does not find its CA certificates, you probably get the same error for any TLS connection?

For the other one, can you check with e.g. dependency walker if all DLLs that it is linked against are available?
Comment 4 Tao 2018-03-19 09:05:51 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> The cygwin GIO module probably does not find its CA certificates, you
> probably get the same error for any TLS connection?
> 
> For the other one, can you check with e.g. dependency walker if all DLLs
> that it is linked against are available?

That's right, every TLS connection fails in my project. But gst-launch works after copying ca-certificates.crt in C:\gstreamer\1.0\x86_64\etc\ssl\certs
Here is command line: gst-launch-1.0 -v souphttpsrc location=https://protectedurl/forthisbugreport ! filesink location=C:/some.key

It seems gnutls and openssl both need a ca-certificate file which should be usually located in /etc/ssl/certs/ca-certificates.crt. Many people are still looking where to put this file on windows, as those libraries have no builtin fallback.

So I would like to give glib-schannel a try, but I can't find a prebuilt dll, so I am trying to build it with meson. But build crash with following error message:
  • File "C:\python\lib\encodings\cp1252.py", line 23 in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 913: character maps to <undefined>

Sebastian, as you're glib-schannel author, could you share glib-schannel prebuilt dll please ?
Comment 5 Nirbheek Chauhan 2018-03-19 14:53:06 UTC
(In reply to Tao from comment #4)
> So I would like to give glib-schannel a try, but I can't find a prebuilt
> dll, so I am trying to build it with meson. But build crash with following
> error message:

What's the complete traceback? Hard to figure out what's happening without context. Also what version of Python are you using, which Windows version (and language) do you use, what git did you use to clone the repository, and how are you building it? (i.e., inside the visual studio tools cmd.exxe prompt or somewhere else?)
Comment 6 Tao 2018-03-19 19:15:05 UTC
I am using Windows 10.0.16299.309 64 bits french and Visual Studio 2017 community edition 15.6.0

Here is complete stacktrace I obtain when using meson installed by its win64 installer and python 3.6.4:
The Meson build system
Version: 0.45.0
Source dir: C:\Users\sauva\Documents\glib-schannel
Build dir: C:\Users\sauva\Documents\glib-schannel\build
Build type: native build
Project name: glib-schannel
Exception in thread Thread-1:
Traceback (most recent call last):
  • File "C:\python\lib\threading.py", line 916 in _bootstrap_inner
  • File "C:\python\lib\threading.py", line 864 in run
  • File "C:\python\lib\subprocess.py", line 1063 in _readerthread
  • File "C:\python\lib\encodings\cp1252.py", line 23 in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 913: character maps to <undefined>

Traceback (most recent call last):
  File "mesonbuild\mesonmain.py", line 361, in run
  File "mesonbuild\mesonmain.py", line 150, in generate
  File "mesonbuild\mesonmain.py", line 189, in _generate
  File "mesonbuild\interpreter.py", line 1444, in __init__
  File "mesonbuild\interpreterbase.py", line 159, in parse_project
  File "mesonbuild\interpreterbase.py", line 195, in evaluate_codeblock
  File "mesonbuild\interpreterbase.py", line 189, in evaluate_codeblock
  File "mesonbuild\interpreterbase.py", line 200, in evaluate_statement
  File "mesonbuild\interpreterbase.py", line 456, in function_call
  File "mesonbuild\interpreterbase.py", line 55, in wrapped
  File "mesonbuild\interpreterbase.py", line 79, in wrapped
  File "mesonbuild\interpreter.py", line 1947, in func_project
  File "mesonbuild\interpreter.py", line 2078, in add_languages
  File "mesonbuild\interpreter.py", line 2001, in detect_compilers
  File "mesonbuild\environment.py", line 543, in detect_c_compiler
  File "mesonbuild\environment.py", line 497, in _detect_c_or_cpp_compiler
  File "mesonbuild\mesonlib.py", line 723, in Popen_safe
  File "C:\python\lib\subprocess.py", line 843, in communicate
  File "C:\python\lib\subprocess.py", line 1113, in _communicate
IndexError: list index out of range

I checked out glib-schannel in bash shell (from Ubuntu 16.04 from Windows Store) using git 2.7.4.

I did not know visual studio has a cmd prompt ! I am just launched cmd from searchbar. Notice I added C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64 to my PATH.
Comment 7 GStreamer system administrator 2018-11-03 15:27:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/451.