kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
735 stars 252 forks source link

Fix for OPENSSL Version detection #158

Closed dalgibbard closed 1 year ago

dalgibbard commented 7 years ago

This should fix the OPENSSL_VERSION errors detailed in #125 and #123 -- essentially, it was trying to compare the OPENSSL_VERSION_NUMBER variable, which isn't present without the opensslv.h header file being imported. This does mean that openssl-dev / libssl-devel packages need to be present in order for the module to compile, but that's generally going to be the case when compiling NGinX anyway.

Tested on my machine with OpenSSL 1.0.2g - was originally getting the messages as seen in the issue numbers above, and couldn't use LDAPS; now, no error, and LDAPS support working as expected.

i-rinat commented 7 years ago

This does mean that openssl-dev / libssl-devel packages need to be present in order for the module to compile

Guarding that inclusion by #if (NGX_OPENSSL)/#endif will help to avoid unwanted requirement.