-
Notifications
You must be signed in to change notification settings - Fork 465
How to use client.starttls() #326
Comments
Please post the full stacktrace from the error. |
Please look at issue #307 |
@aneelaSaleem It does not appear that this issue has anything to do with the difficulties you experienced in #307. Please do not post references to tickets unless you know them to be related. |
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. |
Yeah, the non-optional controls parameter was an oversight in the implementation and needs to be fixed. |
Please update the documentation as well that controls parameter is not optional. |
Just ran into this too -- it'd be nice to know controls aren't optional, when the examples omit it. |
What are the "controls" supposed to be? The documentation just says But in the example there are no controls present, just options and callback: |
Just ran into the same issue and this helped me: Complete example:
|
@kohleman could you please tell what |
I also ran into this. As a workaround I have set the controls parameter to an empty array:
Which is basically what the other methods do when no controls are provided (and also what #651 offers). |
👋 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. |
I am having a little trouble figuring out how to use the client starttls() function. I am creating the client this way:
The client is created correctly and upon calling the starttls function as
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.The text was updated successfully, but these errors were encountered: