pupnp / pupnp

libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems.
https://pupnp.github.io/pupnp
BSD 3-Clause "New" or "Revised" License
353 stars 117 forks source link

Add flag/function to check if SSL is supported #329

Closed wooky closed 2 years ago

wooky commented 2 years ago

Currently, when using the library, there's no way to know if the library was compiled with SSL support. I think it will be useful to have a flag or function that can be accessed at run-time, so the calling program can know if it can use the HTTP client with HTTPS URLs.

whyman commented 2 years ago

https://github.com/pupnp/pupnp/blob/3c9f59ed33586af26f3736a8769875df68ba706a/upnp/inc/upnpconfig.h.cm#L120

wooky commented 2 years ago

Sure, that works during compile time, but not during runtime, if you're dynamically linking to the library.

whyman commented 2 years ago

I probably showing my ignorance here, but If you are dynamically linking and using the SSL symbols, then wouldnt it fail to find those symbols at runtime if they were not present anyway (and therefore not start?)

Vollstrecker commented 2 years ago

Maybe this is needed if you spread a precompiled binary and don't know what lib is installed on the system. Given it would be easier to link statically or ship the lib with it, but it's not impossible.

Or maybe the distro decides to remove ssl with an update and he want's to tell the user what happend.

Vollstrecker commented 2 years ago

As there where no more information except the linked issue I just checked the project, the linked language and the irc-channel. The problem is, that the used build-system of the language has no functionality of detecting features of external stuff. It's more or less a more fancy handwritten Makefile based system.

So this issue is more or less an "Let all the others work around the insufficiency of our new fancy stuff" so not our fault, not our problem, not an issue, closing.