peertube-plugin-auth-ldap: unsupported protocol using node 12.x to connect to ldaps with TLS support < 1.2
Following the production guide on the develop branch, I was unable to connect to a secured ldap (using the auth ldap plugin) and had the following error in the logs :
{"level":"warn","message":"Cannot login ********* in LDAP plugin.","label":"peertube.sem:80 peertube-plugin-auth-ldap","err":
{"stack":"Error: 140182126659456:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1958:\n",
"message":"140182126659456:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1958:\n",
"library":"SSL routines","function":"ssl_choose_client_version",
"reason":"unsupported protocol","code":"ERR_SSL_UNSUPPORTED_PROTOCOL"},
"timestamp":"2021-03-16T16:16:25.431Z"}
After downgrading to node 10.x, everything worked. I guess Node 12 is forcing the use of TLS >= 1.2 ? I didn't manage to make it accept TLS 1.1 though...
Steps to reproduce
- Follow the prouction guide on the develop branch (to install Node 12 instead of Node 10)
- install peertube-plugin-auth-ldap
- configure the plugin to point to your ldaps (that supports TLS <1.2)
- try to log in Additional information
PeerTube instance:
- version: 3.0.1
- NodeJS version: 12.x