]> git.proxmox.com Git - libgit2.git/commit - src/streams/openssl.c
openssl_stream: remove locking initialization on OpenSSL version >=1.1
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Apr 2017 10:54:33 +0000 (12:54 +0200)
committerPatrick Steinhardt <ps@pks.im>
Mon, 10 Apr 2017 09:29:07 +0000 (11:29 +0200)
commit29081c2fd4c951b2c166f327b145dca5212c9fca
tree05e5c069a63fa61dbde15a351580a1c3ab44ce18
parente572b63121dccf71054beeb62d4b18e618379049
openssl_stream: remove locking initialization on OpenSSL version >=1.1

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.
src/openssl_stream.c