制造商ldapjs使用tls

是否有可能使ldapjs(使用nodejs)使用TLS而不是仅使用SSL?

如果是,我将如何设置?

如果不是,他们是否支持TLS的nodejs的任何其他ldap库?

我可以find的唯一信息是ldaps://后者将通过SSL进行连接(请注意,这不会使用LDAP TLS扩展操作,但实际上是与端口636的SSL连接,如在LDAP v2中一样)。

而且在网页上说不支持TLS扩展操作(认真的说就是使用SSL)

如果我需要使用TLS连接到ldap服务器,对解决scheme有何build议?

 `//Thats an old quest but maybe some other ppl could use that: **ldapjs with TLS** var options = { 'rejectUnauthorized': false, }; var client= ldap.createClient({ url: 'ldap://127.0.0.1:389' tlsOptions: options }); client.starttls(options,[], function(err) { console.log('inside the starttls callback'); client.bind('cn=admin,dc=example,dc=com', 'admin',callback ); }); 

`