Commit Graph

106 Commits (2e067d1700fe74fd46b5a3fd7582fd6cd9c23270)

Author SHA1 Message Date
Roger A. Light 2e067d1700 Refuse to compile with lws 3.2.0. 6 years ago
Roger A. Light ed8964de56 Fix CRL file not being reloaded on HUP.
Closes #35.
6 years ago
Roger A. Light 732cb1c45e Consistent ref counting inc and dec functions. 6 years ago
Roger A. Light c39d6294b5 Fixes for bug #1273
* Fix Will message for a persistent client incorrectly being sent when the client reconnects after a clean disconnect.
* Fix Will message for a persistent client not being sent on disconnect.
* Fix mosquitto_pub not using the `-c` option.

Thanks to Yannic Schröder.

Closes #1273.
6 years ago
Roger A. Light 895e209c41 Fix broker originated messages not being sent.
This occurred when `check_retain_source` was set to true.

Closes #1245. Thanks to Christoph Krey.
6 years ago
Roger A. Light f41cca8152 Fix access after free when v5 client with Will message disconnects.
The Will message has as its first property one of content-type,
correlation-data, payload-format-indicator, or response-topic.

Closes #1244. Thanks to Christoph Krey.
6 years ago
Roger A. Light 8531cb1d79 Separate broker message queues into in/out.
This allows and includes better flow control handling for QoS>0.
7 years ago
Roger A. Light baf1909ffb Improve some messages when client disconnects. 7 years ago
Roger Light 77aaec686e
Merge pull request #1224 from omenlabs/ALPN
Bridge TLS Application-Layer Protocol Negotiation
7 years ago
John Hickey c011be62a4 Bridge TLS Application-Layer Protocol Negotiation
In order to connect to brokers that support both websockets and
mqtt on the same port (such as Amazon IoT), we need to set an
application for the SSL context.  This change allows the specification
of an application by using the `bridge_alpn` configuration token.

Signed-off-by: John Hickey <jjh-github@daedalian.us>
7 years ago
Roger A. Light 2e7dcee342 Multistep auth, plus reauth, plus tests. 7 years ago
Roger A. Light c1776a0b39 Add reauth parameter for extended auth. 7 years ago
Roger A. Light 0f6e51d582 Code and tests for returning single stage auth data back to client. 7 years ago
Roger A. Light 494f35bd8d Add mosquitto_set_username() plugin function. 7 years ago
Roger A. Light a29a7dadc6 Basic plugin support for single step extended auth. 7 years ago
Roger A. Light fb8a2baaad Refactor client msgs to use utlist to reduce code complexity. 7 years ago
Roger A. Light 75c2a39d2c Send topic alias maximum from the broker. 7 years ago
Roger A. Light ea046c2405 Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master 7 years ago
Roger A. Light 214a5f3aab v5 persistence file format
This includes changes to improve read/write performance.
It is not complete, and will have further changes to add properties and anything else required for MQTT v5.
7 years ago
Roger A. Light c90bd4e0c6 Add helper function for internal debug logging. 7 years ago
Roger A. Light 320ddc1303 Merge branch 'master'
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	client/Makefile
	config.mk
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/mosquitto.h
	lib/mqtt3_protocol.h
	lib/util_mosq.c
	set-version.sh
	snap/snapcraft.yaml
	src/bridge.c
	src/database.c
	src/handle_connack.c
	src/loop.c
	src/persist.c
	test/broker/Makefile
7 years ago
Roger A. Light 110f4aada6 Don't overwrite disused client state. 7 years ago
Roger Light 8a8d13cf96 Shared subscription support. 7 years ago
Roger A. Light 2dd24449ad Fix "unused parameter" warnings. 7 years ago
Roger A. Light b82370a997 Free clients with session expiry > 0 on exit. 7 years ago
Roger Light 1a234323a3 Add support for custom log timestamps.
Closes #1121.
7 years ago
Roger Light a57bba0aae Don't use uhpa for topics, incompatible with uthash. 7 years ago
Roger A. Light ac91144495 Session expiry interval support - not working for file persistence. 7 years ago
Roger A. Light ce31269e05 Update changelog, bump version, bump copyright year. 7 years ago
Pierre Fersing 1aaf5f2348 Add websockets_headers_size option
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
7 years ago
Roger A. Light 130ddf47f7 Add `dhparamfile` option, to allow DH parameters to be loaded.
This is for Ephemeral DH support on listeners.
7 years ago
Abilio Marques 87eb535307 bridge: add decorrelated jitter backoff mechanism
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
7 years ago
Steven Lawrance 208c3d3e85 Allow binding a listener to a specific network interface
Signed-off-by: Steven Lawrance <stl@koffein.net>
7 years ago
Roger A. Light c506c8335b Will delay tests and implementation. 7 years ago
Roger A. Light 5aabc171b0 Merge branch 'mqtt5' into develop 7 years ago
Roger A. Light e862a047a8 Rework TLS engine support. 7 years ago
Nicolás Pernas Maradei 20894fcbce Add engine private key password support
Some OpenSSL engines (selectable via tls_engine option) may require a
password to make use of private keys created with them in the first place.

The TPM engine for example, will require a password to access the underlying
TPM's Storage Root Key (SRK), which is the root key of a hierarchy of keys
associated with a TPM; it is generated within a TPM and is a non-migratable
key. Each owned TPM contains a SRK, generated by the TPM at the request
of the Owner. [1]

By default, the engine will prompt the user to introduce the SRK password
before any private keys created with the engine can be used. This could
be inconvenient when running on an unattended system.

Here's where the new tls_engine_kpass_sha option comes in handy. The user
can specify a SHA1 hash of its engine private key password via command
line or config file and it will be passed on to the engine directly.

This commit adds support for both clients (libmosquitto) and broker.

[1] https://goo.gl/qQoXBY

Signed-off-by: Nicolás Pernas Maradei <nicopernas@gmail.com>
7 years ago
Nicolás Pernas Maradei d5f039ec7c Add TLS engine and keyform support to mosquitto
Add same OpenSSL engine support to mosquitto (server side) previously added to
client side only.

Signed-off-by: Nicolás Pernas Maradei <nicopernas@gmail.com>
7 years ago
Roger A. Light 1d17ced449 Broker configurable max_packet_size
Plus tests.
7 years ago
Roger A. Light 1479c57e34 v5 report reason code=no sub when unsubscribing. 7 years ago
Roger A. Light 1ec0cea34a Fix missing reason_code on v5 UNSUBACK.
Closes #1167. Thanks to Christoph Krey.
7 years ago
Roger A. Light 321e566af6 Fix unref'd messages being saved to the persistence file.
This was leaving dangling messages that were never freed.

Closes #389. Thanks to pjchx.
7 years ago
Roger A. Light 084062c85e Merge branch 'fixes' into mqtt5 7 years ago
Roger A. Light d6a690aa8d Fix Will not being sent for Websockets clients.
Closes #1143. Thanks to salcedo.
7 years ago
Roger Light c40957a7d8 Fix and tests for CVE-2018-12546. 7 years ago
Roger Light 5236295159 Handle mismatched handshakes properly.
For example, a QoS1 PUBLISH with QoS2 reply.
7 years ago
Roger A. Light ca3782b38d Test and fixes for will message expiry interval. 7 years ago
Roger A. Light 326292681a Add maximum-qos support to broker and client.
This comes in the form of:

* Per listener maximum_qos option, which can be in the range 0-2.
* Changes to mosquitto_publish*() to return MOSQ_ERR_QOS_NOT_SUPPORTED
  if attempting to publish with a higher QoS than supported.
* Bridges will downgrade messages to match the maximum QoS.

More tests on the broker side (specifically bridges) are required. This
needs bridge support for MQTT 5 first.
7 years ago
Roger A. Light 16e83bfe5d Process receive maximum (as max_inflight_messages). 7 years ago
Roger A. Light 7c3666d593 Subscription identifier support. 7 years ago