How to use client.starttls()
See original GitHub issueI am having a little trouble figuring out how to use the client starttls() function. I am creating the client this way:
client = ldap.createClient({
url: config.ldap.url
});
The client is created correctly and upon calling the starttls function as
client.starttls({}, function(err) {
console.log('inside the starttls's callback');
});
However, the callback function never gets called. I get the error : [TypeError: Object.keys called on non-object]
. In the Node.js TLS documentation it mentions that on connecting, if the certificate authority is left blank it will default to the system certificates, and I was assuming that this would act in the same way. If there were any thoughts on what is going wrong here, that would be great.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
What is StartTLS? - SendGrid
StartTLS is a protocol command used to inform the email server that the email client wants to upgrade from an insecure connection to...
Read more >What is StartTLS and how can it be tested? - IONOS
The StartTLS command can be used to initiate encrypted e-mail communication based on the TLS protocol. This provides high flexibility but ...
Read more >SSL, TLS, and STARTTLS - Fastmail Help
This is an informational page about the history of SSL, TLS, and STARTTLS and the ... All clients were expected to move over...
Read more >STARTTLS vs SSL vs TLS Explained in 5 Minutes | Mailtrap Blog
How do TLS/SSL and STARTTLS work? ... It's used to tell an email server that an email client (such as Gmail, Outlook, etc.) ......
Read more >What Are SSL, TLS, & STARTTLS Email Encryption? - SparkPost
STARTTLS is an email protocol command that tells an email server that an email client, including an email client running in a web...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please update the documentation as well that controls parameter is not optional.
Sorry for the delay. I haven’t been working on this for this past week. Here is the stack trace:
After some further looking, it appears that the controls parameter is required. I was leaving that out as optional, so it was trying to use the callback as the controls. After that, I passed in an empty object for the controls, and apparently it requires the controls to be an array so passing in an empty array works. That might be something helpful to have in the docs or have some type checking on the controls.