| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| #ifdef GIT_THREADS | ||
| #ifndef GIT_THREADS | ||
| giterr_set(GITERR_THREAD, "libgit2 was not built with threads"); | ||
| return -1; |
There was a problem hiding this comment.
Just realized this does not make any sense when building against 1.1. I should probably just return success if GIT_THREADS && OPENSSL_VERSION >= 0x10100000L.
Sorry, something went wrong.
Up to version 1.0, OpenSSL required us to provide a callback which implements a locking mechanism. Due to problems in the API design though this mechanism was inherently broken, especially regarding that the locking callback cannot report errors in an obvious way. Due to this shortcoming, the locking initialization has been completely removed in OpenSSL version 1.1. As the library has also been refactored to not make any use of these callback functions, we can safely remove all initialization of the locking subsystem if compiling against OpenSSL version 1.1 or higher. This fixes a compilation error when compiling against OpenSSL version 1.1 which has been built without stubs for deprecated syntax.
Previous to OpenSSL version 1.1, the user had to initialize at least the error strings as well as the SSL algorithms by himself. OpenSSL version 1.1 instead provides a new function `OPENSSL_init_ssl`, which handles initialization of all subsystems. As the new API call will by default load error strings and initialize the SSL algorithms, we can safely replace these calls when compiling against version 1.1 or later. This fixes a compiler error when compiling against OpenSSL version 1.1 which has been built without stubs for deprecated syntax.
| Back | FazBrowse Home | New Git URL |
This fixes the issues raised by #4194. When bulding against OpenSSL without deprecated features, we currently fail. This can be provoked by defining "-DOPENSSL_API_COMPAT=0x10100000L" when OpenSSL 1.1 is installed.