Author Topic: SSL on Linux  (Read 585 times)

Taiko2k

  • Posts: 15
SSL on Linux
« on: 3 Feb '19 - 04:28 »
Is there any reason HTTPS shouldn't work? I'm using Linux.

When I try open an https url using BASS_StreamCreateURL I then get error 10 (BASS_ERROR_SSL).

I tired using BASS_SetConfigPtr to set BASS_CONFIG_LIBSSL but I couldn't get that working without error 20 (BASS_ERROR_ILLPARAM) though I may have been doing something wrong there as I am not experienced with this. Besides I assume something else is wrong since I assume it should find libssl.so by default? I don't believe there is anything non-standard about my installation:  /usr/lib/libssl.so exists as a link to the file /usr/lib/libssl.so.1.1

Just to note, I'm using the 64 bit version of bass

Ian @ un4seen

  • Administrator
  • Posts: 22036
Re: SSL on Linux
« Reply #1 on: 4 Feb '19 - 15:39 »
Please confirm what BASS version you are using, ie. what does BASS_GetVersion return? The BASS_CONFIG_LIBSSL option was introduced in the latest release (2.4.14), and a BASS_ERROR_ILLPARAM error would be the result when trying to use it with an older version.

Taiko2k

  • Posts: 15
Re: SSL on Linux
« Reply #2 on: 5 Feb '19 - 01:30 »
I have made sure to be using the latest version and setting BASS_CONFIG_LIBSSL now no longer returns an error.

Interestingly, setting libssl.so.1.1 continues to give BASS_ERROR_SSL, however setting libssl.so.1.0.0 does work.


As a side issue, I was experimenting with using PLEX as an audio source, the PLEX API gives me a long complex looking URL to stream from which works in browsers and appears to download as an mp3 file, but passing it to BASS_StreamCreateURL causes the function to block.

Ill just note, these issues are not high priority for me, I was mostly simply experimenting with things.

Ian @ un4seen

  • Administrator
  • Posts: 22036
Re: SSL on Linux
« Reply #3 on: 6 Feb '19 - 12:17 »
I have made sure to be using the latest version and setting BASS_CONFIG_LIBSSL now no longer returns an error.

Interestingly, setting libssl.so.1.1 continues to give BASS_ERROR_SSL, however setting libssl.so.1.0.0 does work.

The current BASS release does indeed only support libssl v1.0, but here's an update that adds support for v1.1:

   www.un4seen.com/stuff/bass-linux.zip

As a side issue, I was experimenting with using PLEX as an audio source, the PLEX API gives me a long complex looking URL to stream from which works in browsers and appears to download as an mp3 file, but passing it to BASS_StreamCreateURL causes the function to block.

BASS_StreamCreateURL does block while connecting and downloading some data to detect the format and initialize the decoder. So it shouldn't generally be called in a UI thread, but rather in a worker thread. A demonstration of doing that can be found in the NETRADIO example that's included in the BASS package.

Taiko2k

  • Posts: 15
Re: SSL on Linux
« Reply #4 on: 6 Feb '19 - 22:06 »
Ah that would make sense! Thank you for updating this.

As for the BASS_StreamCreateURL blocking issue, I should clarify, I meant to say, the function never returns or plays any audio. I assume it should at least return an error, so it seems like a bug.

Ian @ un4seen

  • Administrator
  • Posts: 22036
Re: SSL on Linux
« Reply #5 on: 7 Feb '19 - 14:00 »
OK. I will send you a debug BASS version to get more info on that.