node-ldapjs
node-ldapjs copied to clipboard
Documentation shows false implementation
Hello There i just got started with ldapjs and there doesn't seem to be a fine example of how to use starttls
https://github.com/ldapjs/node-ldapjs/blob/master/docs/client.md#starttls
Doc says usage is starttls(options, controls, callback)
But example says
const opts = {
ca: [fs.readFileSync('mycacert.pem')]
};
client.starttls(opts, (err, res) => {
assert.ifError(err);
// Client communication now TLS protected
});
But doesnt seem to be an optional param:
Client.prototype.starttls = function starttls (options, controls, callback, _bypass) {
//...
}
how do i properly create tls upgrade with the starttls method? or better how do i create/use the control?
The control is added by the starttls
method:
https://github.com/ldapjs/node-ldapjs/blob/9143456b4fa2e07127fb1fd37677fdfd4c73a6c5/lib/client/client.js#L744-L748
👋
On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.
Please see issue #839 for more information, including how to proceed if you feel this closure is in error.