Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTPS_BACKEND_CURL_LINKED preprocessor AND CMake option. #22

Closed
wants to merge 3 commits into from

Conversation

MikuAuahDark
Copy link
Contributor

Specifying HTTPS_BACKEND_CURL_LINKED means the libcurl will be linked along with the resulting https shared library, which may link with more binaries than necessary.

Only enable this option if you have policy of prohibiting shared object loading at runtime or if your platform doesn't support it.

Fixes #16

Specifying HTTPS_BACKEND_CURL_LINKED means the libcurl will be linked along with the resulting https shared library, which may link with more binaries than necessary.

Only enable this option if you have policy of prohibiting shared object loading at runtime or if your platform doesn't support it.
@TurtleP
Copy link
Contributor

TurtleP commented Aug 21, 2023

Tested this on LÖVE Potion 3.0 Prerelease (took me long enough). It doesn't compile currently, though discussion with @MikuAuahDark has shown there's two needed #ifndef wrappers:

https://github.com/TurtleP/lua-https/blob/linked_curl/src/generic/CurlClient.cpp#L15-L22
https://github.com/TurtleP/lua-https/blob/linked_curl/src/generic/CurlClient.cpp#L34-L45

This will allow it to build an run, but the homebrew consoles I run this on do not come with any kind of CA Certificates. I could either embed an extracted one for all platforms or (and likely not preferred) disable CURLOPT_SSL_VERIFYPEER. Because of this issue, all result codes return zero.

EDIT:
I forgot to mention, main.cpp will need renaming because, well, typically the main application this will embed into will already have a main.cpp. Because of this, maybe rename it to main_lua.cpp, lua_https.cpp, or whatever would not cause a likely name conflict during compilation.

@MikuAuahDark
Copy link
Contributor Author

Closed in favor of #30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] cURL compile-time option
2 participants