kvspb / nginx-auth-ldap

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

ngx_http_auth_ldap_module.c:1325:79: error: dereferencing pointer to incomplete type #150

Open bbigras opened 7 years ago

bbigras commented 7 years ago

nginx-1.11.4

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/http/modules/perl -I debian/extra/njs-0.1.2/nginx/../nxt -I debian/extra/njs-0.1.2/nginx/../njs -I debian/extra/njs-0.1.2/nginx/../nxt -I debian/extra/njs-0.1.2/nginx/../njs -I /opt/openssl-1.1.0/.openssl/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/stream \
                -o objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o \
                /home/bbigras/nginx/nginx-1.11.4/debian/modules/nginx-auth-ldap/ngx_http_auth_ldap_module.c
/home/bbigras/nginx/nginx-1.11.4/debian/modules/nginx-auth-ldap/ngx_http_auth_ldap_module.c: In function ‘ngx_http_auth_ldap_ssl_handshake’:
/home/bbigras/nginx/nginx-1.11.4/debian/modules/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1325:79: error: dereferencing pointer to incomplete type
         int setcode = SSL_CTX_load_verify_locations(transport->ssl->connection->ctx,
                                                                               ^
/home/bbigras/nginx/nginx-1.11.4/debian/modules/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1335:80: error: dereferencing pointer to incomplete type
       int setcode = SSL_CTX_set_default_verify_paths(transport->ssl->connection->ctx);
tianjiaolaozu commented 7 years ago

same issue here with CentOS release 6.6 (Final)

/usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1394: error: dereferencing pointer to incomplete type /usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1404: error: dereferencing pointer to incomplete type

bbigras commented 7 years ago

@tianjiaolaozu You may be interested in ngx_http_auth_request_module. Basically you can code another simple http server that will handle the authentification and the response codes will tell nginx if the user is authenticated or not. I prefer this since it will never break between nginx updates and you don't have to build nginx yourself.

evacao1225 commented 7 years ago

@bbigras I also ran into this issue on redhat 7 when I enable both http_ssl_module and this ldap module. However, if only this ldap module, everything is fine. Do you know how to solve it? Thanks a lot!

bbigras commented 7 years ago

@evacao1225 I gave up on using this module. It was a lot simpler to use the official ngx_http_auth_request_module and write a simple program to do the LDAP stuff and return the right HTTP status code.

keith6014 commented 2 years ago

@bbigras Do you have an example on how to do that?