I am using CometD library for nodejs on server side using the https://www.npmjs.com/package/cometd-nodejs-client. The server (Genesys) that I am trying to connect uses SSL, due to SSL cert I am getting SSL error when connecting to the server using CometD. My question is that is there a way to pass the ca cert to CometD library (https://www.npmjs.com/package/cometd)?
-
What error do you get? Genesys should have their certificates signed properly, no? – sbordet Apr 07 '21 at 20:32
-
I am getting "SSL certificate problem: self signed certificate in certificate chain" when connecting to Genesys. – Satpal Apr 09 '21 at 19:09
2 Answers
The XMLHttpRequest
provided by the CometD library exposes a _config()
function that returns a configuration object that is passed to Node's http.request(...)
, allowing you to configure TLS if so you need.
You can refer to this test case:
https://github.com/cometd/cometd-nodejs-client/blob/1.3.0/test/https.js#L53

- 16,856
- 1
- 50
- 45
I am also seeing a similar issue when using CometD and CometD Client packages to connect to Genesys.
I have a nodejs server that adds all the /meta/handshake, /meta/connect, /meta/disconnect
... listeners. When I try to trigger the /meta/handshake
I seeing SSL self signed certificate in certificate chain
error. As a solution, I tried to install the ssl certificates on my server and tried to connect to Genesys but I still see the same self signed certificate error.
Is there a way to configure the listeners with rejectUnauthorized: false
?

- 1
- 1