-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not work tls in MQTT.js ? #19978
Labels
Comments
Another reproduction without a local MQTT broker: import mqtt from "npm:mqtt";
import fs from "node:fs";
const client = mqtt.connect({
port: 8884,
host: "test.mosquitto.org",
key: fs.readFileSync("client.key"),
cert: fs.readFileSync("client.crt"),
ca: fs.readFileSync("mosquitto.org.crt"),
protocol: 'mqtts'
});
client.on("connect", () => {
console.log("Connected");
client.subscribe("topic");
});
client.on("message", (topic, payload) => {
console.log([topic, new TextDecoder().decode(payload)]);
});
setInterval(async () => {
console.log(await client.publish("topic", "payload"));
}, 2000); Generate certificates from https://test.mosquitto.org/ssl/ |
littledivy
added a commit
that referenced
this issue
Aug 11, 2023
littledivy
added a commit
to littledivy/deno
that referenced
this issue
Aug 21, 2023
Closes denoland#19983 Closes denoland#18303 Closes denoland#16681 Closes denoland#19978
littledivy
added a commit
that referenced
this issue
Aug 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When MQTT.js is used with Deno, TLS may not be used correctly.
For example.
On the broker server, openssl is causing an error.
I can confirm that Node.js works with similar code.
Is it possible to improve compatibility here?
The text was updated successfully, but these errors were encountered: