1

I succesfully used libsoup to request an API using https in C used from C++. However when I build in release mode my request would get rejected with status 6: unacceptable TLS certificate.

I tried to get more information and found out the "tls-database" property of my SoupSession was NULL in release mode and was a valid pointer in Debug mode.

I tried to dig into the glib sources to find possible informations on how GTlsDatabase was built but was unable to find the specific Windows implementations to understand the issue...

I use the glib/libsoup included in GStreamer 1.12.4 installer for Windows (10) which is libsoup 2.56.0.

Is there a way to specifically load the certificate (found nothing on that too) or is there a specific env var that would be available in debug mode only? Is there a bug I didn't find in the bugs reported?

Krapow
  • 611
  • 6
  • 26
  • What are ‘release mode’ and ‘debug mode’ and how do they differ? GLib doesn’t have them, so I assume they are specific to your application. – Philip Withnall Nov 03 '18 at 09:02
  • "debug mode" and "release mode" are set in Visual Studio and are not specific to my application but to the compiler. GLib is probably compiled in release mode which means without debug symbols generated and with optimization flags. I cannot manage to figure out anything with this... – Krapow Nov 05 '18 at 10:53
  • Have you tried using the debugger to trace where the `tls-database` is set? What `GTlsBackend` are you using? Are you using `SoupSession`, `SoupSessionAsync` or `SoupSessionSync`? What are its `ssl-ca-file` and `ssl-use-system-ca-file` properties? – Philip Withnall Nov 06 '18 at 09:25
  • 1
    ssl-ca-file is NULL and ssl-use-system-ca-file is TRUE. I use plain SoupSession. And my setup do not allow me to go inside the GLib source while tracing... However I discovered my release executable is working when launched from the GStreamer ROOT_DIR (or a subdir) while if I copy my dev environnement file and dll into the C:\Program File of an installation, my requests stop working – Krapow Nov 07 '18 at 16:27

0 Answers0