Add SNI support

This commit is contained in:
Thomas Nordquist
2019-06-20 18:18:44 +02:00
parent 03784601ea
commit 261454986e

View File

@@ -44,8 +44,9 @@ export class MqttSource implements DataSource<MqttOptions> {
username: options.username, username: options.username,
password: options.password, password: options.password,
clientId: options.clientId, clientId: options.clientId,
servername: options.tls ? url.host : undefined,
ca: options.certificateAuthority ? Buffer.from(options.certificateAuthority, 'base64') : undefined, ca: options.certificateAuthority ? Buffer.from(options.certificateAuthority, 'base64') : undefined,
}) } as any)
this.client = client this.client = client