groove-x / mqtt_bridge

mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional
MIT License
159 stars 146 forks source link

TLS Example #7

Closed Binsoma closed 3 years ago

Binsoma commented 6 years ago

Could anyone provide an example on how to configure mqtt_bridge over TLS. Thanks in advance.

ledmonster commented 6 years ago

@Binsoma

You can configure TLS like this:

mqtt:
  client:
    protocol: 4      # MQTTv311
  connection:
    host: localhost
    port: 1883
    keepalive: 60
  private_path: device/001
  tls:
    ca_certs: /etc/ssl/certs/Root_CA.pem
    certfile: /etc/ssl/certs/Client.pem
    keyfile: /etc/ssl/private/Client.key
    cert_reqs: 2  # ssl.CERT_REQUIRED
    tls_version: 3  # ssl.PROTOCOL_TLSv1
    ciphers: SHA1
    tls_insecure: true

You can see tls parameters here: