node-activedirectory
node-activedirectory copied to clipboard
Cert is empty error
At times while connecting to ldap we are getting below error but not always. "reason": "Cert is empty",
Can somebody help me identifying the actual cause
Further error trace
{ Error: Hostname/IP doesn't match certificate's altnames: "Cert is empty"
at Object.checkServerIdentity (tls.js:199:17)
at TLSSocket.<anonymous> (_tls_wrap.js:1091:29)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:603:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
I used this tool to test out same flow and it was working fine http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm#Free
I think this is seen when the cert lacks a subject name (i.e. it only has SubjectAltName). This is perfectly valid as far as I am aware however it trips up something in this node-tls-ldapjs-activedirectory stack. Looking into it (as a user, not a dev). EDIT: this is a node bug. https://github.com/nodejs/node/issues/11771 similar libraries to this are working around it themselves: https://github.com/auth0/ad-ldap-connector/pull/94/commits/1f4dd2be6ed93dda591dd31ed5483a9b452a8d2a