Skip to content
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

Using protocol MQTTS trigger a protocol error on server side #498

Open
vulcainman opened this issue Jan 16, 2024 · 2 comments
Open

Using protocol MQTTS trigger a protocol error on server side #498

vulcainman opened this issue Jan 16, 2024 · 2 comments
Assignees

Comments

@vulcainman
Copy link

Bug description

When the script is used to check a MQTTS server, it works as expected but, an error is logged on broker side indicating a protocol error:

1705416973: New connection from 10.83.86.20:55972 on port 8883.
1705416973: Client <unknown> disconnected due to protocol error.

Steps to reproduce

Call the script against a mosquitto server:

check_ssl_cert -P mqtts -H my.host.com -p 8883

Expected behavior

The script should indicate if the SSL certificate is OK and, it should init and close the connection with the MQTT broker properly.

System:

  • OS: Debian
  • OS version: 13 (Trixie)
  • check_ssl_cert version: 2.79.0
  • OpenSSL version (openssl version): 3.1.4-2
  • MQTT broker : Mosquitto 2.0.11
@vulcainman vulcainman added the bug label Jan 16, 2024
@matteocorti matteocorti self-assigned this Jan 17, 2024
@matteocorti
Copy link
Owner

matteocorti commented Mar 20, 2024

We send a CONNECT control packet as client a

\x10\x0d\x00\x04MQTT\x04\x00\x00\x00\x00\x01a

but we don't close.

@matteocorti
Copy link
Owner

I am not an expert: if someone has an example of the payload to close cleanly, please post it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants