node-red-contrib / node-red-contrib-mikrotik

Node-red node to work with Mikrotik WiFi router
ISC License
14 stars 14 forks source link

support for ECDSA TLS certificates #70

Closed clmcavaney closed 1 year ago

clmcavaney commented 1 year ago

Describe the bug I have created a new TLS certificate (via Let's Encrypt) and the default type is ECDSA. This works with modern web browsers, but I think the library supporting the TLS options for the API-SSL method isn't handling a certificate of this type.

To Reproduce Steps to reproduce the behavior:

  1. Create a mikrotik node with the configuration for API-SSL appropriate host, port, username and password - also SSL chosen as API-SSL. I was using a System resources action in the node.

  2. Create a injector node.

  3. Connect the two nodes.

The node-red server errors out with:

14 Jul 17:38:59 - [error] RosException
    at Connector.onError (/data/node_modules/node-routeros/dist/connector/Connector.js:176:15)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Expected behavior The command executed and the response is received by node-red.

Screenshots n/a

Version (please complete the following information):

Additional context I adjusted the settings to use a non SSL/TLS API call and it works, so the RouterOS version on the Mikrotik router is fine.

I am wondering is an underlying library in Typescript and/or Javascript needs updating?

konne commented 1 year ago

the issue is the underlaying library is not maintained any more. If you find a new library that could work, just reopen that issue and sent it to me.