Skip to content

Mosquitto_pub/_sub cryptic protocol error message on invalid server certificate #2746

Closed
@axos88

Description

@axos88

Repro:

  1. Check out the develop branch
  2. Create a server offering a certificate with CN foo.example.com
  3. Open a connection via mosquitto_sub with another address pointing to the machine, such as:

./client/mosquitto_sub -t topic -i clientid -h bar.example.com -p 8883 --capath /etc/ssl/certs

Expectation:

  • Some kind of error message specifying that the server provided an invalid certificate / a valid certificate with the incorrect CN.

Actual: Error: Protocol error

Super confusing, because I thought there was an actual mismatch of TLS versions, or the server not accepting TLS connections or the client not trying to start a TLS connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions