Commit Graph

76 Commits (a1a190b4828b3678c2a75d7d55926e8c3351ccba)

Author SHA1 Message Date
Roger A. Light a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
5 years ago
Roger A. Light df1802d8f1 Fix client state conversion warnings. 5 years ago
Roger A. Light 3731535298 Add SPDX license identifiers. 5 years ago
Roger A. Light 584cf51ba7 Update to EPL-2.0 5 years ago
Roger A. Light b816d46508 Use db as a global var instead of passing to functions.
This allows a big swath of ifdefs to be removed. It also means savings as the db var is not passed around all of the time, and makes it easier to remove the final broker call to mosquitto_time() call in packet_mosq.c. In one test this reduced the calls to mosquitto_time() from 295k to 48k.
5 years ago
Roger A. Light 108b23ce6d Reduce use of mosquitto_time() and time(). 5 years ago
Roger A. Light 4f61f6c161 Fix conversion errors. 5 years ago
Roger A. Light b0a065f790 Update changelog. Release page. Bump copyright. 6 years ago
Roger A. Light 27b4518d7e Improve password file parsing in the broker and mosqitto_passwd.
Closes #1584. Thanks to panava.
6 years ago
Roger A. Light e188a6b500 More whitespace trimming fixes/consolidation. 6 years ago
Roger A. Light 70fd600c3a Fix trailing whitespace not being trimmed on acl users.
Closes #1539. Thanks to CliveJL and LeonPoon.
6 years ago
Panagiotis Vasilikos dd6d8237cb Potential Null pointer dereference in util_mosq.c
Reason: There is no check that the mosquitto__malloc at line 162 was sucessfull.
This could result to a Null pointer dereference in the memcpy call at line 166.

Fix: I added the check.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Roger A. Light 1a8c44b84f Fix regression on use of `mosquitto_connect_async()` not working.
Closes #1415 and #1422. Thanks to Karl Palsson, Till Zimmermann and Liam Fry.
6 years ago
Roger A. Light ee3591d228 Fix missing locks on `mosq->state`.
Closes #1374. Thanks to Jeff Trull.
6 years ago
Roger Light 2b2afc93bc Allow other apps access to log file on Windows.
This change means that users with the appropriate security permissions
can open the log file for reading at the same time that it is being
written.

Closes #515.
6 years ago
Roger A. Light 3f8f4fc2c8 Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
6 years ago
Roger A. Light d05bd95881 Fix compilation problem related to getrandom() on non-glibc systems. 6 years ago
Roger A. Light b1298dff54 Fix use of getrandom() for Linux and WITH_TLS=no. 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 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 0941638143 Fix signed/unsigned comparion warnings.
Closes #1196.
7 years ago
Roger A. Light ce31269e05 Update changelog, bump version, bump copyright year. 7 years ago
Roger A. Light 1a3eaeabce Only use getrandom on recent glibc, when TLS not in use. 7 years ago
Roger A. Light 48d731ecb5 Use better random numbers for everything, where possible. 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
Roger A. Light f9f3fdbfe3 Fix pattern matching test. 7 years ago
Roger A. Light 084062c85e Merge branch 'fixes' into mqtt5 7 years ago
Roger A. Light e72d1d6ff5 Fix `mosquitto_topic_matches_sub()` rc with sub=="topic/#abc".
This now returns MOSQ_ERR_INVAL as expected.
7 years ago
Roger A. Light f952ae3a67 Fixed durable clients being unable to receive messages when offline.
This occurred when per_listener_settings was set to true.

Closes #1081. Thanks to dwin-wangjt.
7 years ago
Roger A. Light ab8b57ff54 Allow broker to always restart on Windows when using `log_dest file`.
Closes #1080. Thanks to lcouz.
7 years ago
Roger A. Light be9c1071b0 Fix compilation when openssl deprecated APIs are not available.
Closes #1094. Thanks to Rosen Penev.
7 years ago
Roger Light 84660e1cbe Send maximum limits for QoS>0.
This needs more work on the broker front to simplify the design.
7 years ago
Roger Light 67c1d4453e Receive maximum support for clients. 7 years ago
Roger A. Light fcf4cd0b27 Merge branch 'master' into mqtt5 7 years ago
Roger A. Light a00dd29af8 Fix building where TLS-PSK is not available.
Closes #68.
7 years ago
Roger A. Light 73c46174f8 Don't call on_disconnect() twice if keepalive tests fail.
Closes #1067. Thanks to xingchen02.

Bug: https://github.com/eclipse/mosquitto/issues/1067
7 years ago
Roger A. Light 158189393e Add v5 client callbacks. 7 years ago
Roger A. Light 6609bbac10 Move topic matching tests to unit tests. Needs improving. 7 years ago
Roger A. Light 88765a5e80 Consistent use of config.h across the project. 7 years ago
Roger A. Light 4bacbecb1b Fix some places where return codes were incorrect.
Closes #850.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 57ee8b92bc Mac build fixes. 8 years ago
Roger A. Light 24d68b5af8 Remove support for openssl 1.0.0 and 1.0.1.
These are no longer supported by openssl.
8 years ago
Roger A. Light f4d238be18 Bump copyright years. 8 years ago
Roger A. Light 81cb7ab547 Merge branch 'fixes' into develop 8 years ago
Roger A. Light 1b702538f9 Add check and matches functions which take length arguments.
mosquitto_pub_topic_check2()
mosquitto_sub_topic_check2()
mosquitto_topic_matches_sub2()
8 years ago
Roger A. Light b02c1a41bb [670] Fix topic matching of foo/bar against foo/+/#
Thanks to mrdis.

Bug: https://github.com/eclipse/mosquitto/issues/670
8 years ago
Roger A. Light ae666b07ce [654] Initialise "result" in mosquitto_topic_matches_sub.
Thanks to markhermelinggt.

Bug: https://github.com/eclipse/mosquitto/issues/654
8 years ago
Roger A. Light 5a267368d7 Merge branch 'master' into develop 8 years ago