eclipse / paho.golang

Go libraries
Other
330 stars 92 forks source link

Question - How to use certs in CONNECT packets? #175

Closed patilsnr closed 10 months ago

patilsnr commented 10 months ago

Can you please provide any guidance on how to use certificates in a CONNECT packet? Is that information stored in ConnectProperties, or elsewhere? Apologies if this is not the proper forum to ask about this, and I'm happy to clarify more as needed.

MattBrittan commented 10 months ago

certificates in a CONNECT packet

This is not really answerable without more info; CONNECT packets don't have any specific provision for certificates. Certificates may be utilised when setting fields within the connect packet (e.g. a signed token) but no specific use is mandated in the MQTT spec. They may also be used as part of the auth workflow but, again, the details of this are implementation dependent.

The most common way to use certs is to pass a client cert as part of the TLS transaction (e.g. TlsCfg in the autopaho config) (this is completed before a CONNECT packet is sent).

Can you please provide more info (i.e. which broker, any info on the auth workflow).

patilsnr commented 10 months ago

thanks for the reply, TlsCfg solved the issue