Gianfranco Costamagna
5b011ff112
Add dynamic symbols linking with cmake too
...
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
2023-09-26 23:40:50 +02:00
Roger A. Light
97c25654ed
Add helper messages for lax permissions
2023-09-18 22:21:56 +01:00
Roger A. Light
bfb373d774
Fix max_queued_message 0
stopping clients from receiving messages.
...
Closes #2789 . Thanks to Daedaluz.
2023-08-22 07:40:54 +01:00
Roger A. Light
284db04bc3
Library will no longer allow single level wildcard certificates, e.g. *.com
2023-08-16 14:01:21 +01:00
Roger A. Light
6113eac95a
Fix for CVE-2023-28366
2023-08-16 14:01:21 +01:00
Roger A. Light
a3c680fbb0
Fix for Eclipse #581199
2023-08-16 14:01:21 +01:00
Roger A. Light
4ca294fd9c
Warn on lax permissions on sensitive files.
...
- Broker will log warnings if sensitive files are world readable/writable, or
if the owner/group is not the same as the user/group the broker is running
as. In future versions the broker will refuse to open these files.
2023-08-16 14:01:21 +01:00
Roger Light
4093dad058
Merge pull request #2827 from bdesplanq/fix-engine-support
...
Fix engine keyfile support.
2023-08-15 14:09:01 +01:00
Roger A. Light
cb90e91126
Add missing mosquitto_strerror entries.
...
Closes #2799 . Thanks to n00b42
2023-08-12 10:12:52 +01:00
Bart Desplanques
105e30ff5b
Fix engine support.
...
Do not try to open keyfile when keyform is "engine": this is not necessarily a real file.
Dynamic engines require init with OPENSSL_INIT_ENGINE_DYNAMIC before they can be loaded.
Signed-off-by: Bart Desplanques <bart.desplanques@gmail.com>
2023-06-02 19:11:50 +02:00
Roger A. Light
269756a171
Fix high CPU use on slow TLS connect.
...
Closes #2794 . Thanks to Evgeny S.
2023-04-27 23:25:52 +01:00
Roger A. Light
1bf753e773
Fix confusing message on TLS certificate verification.
...
Closes #2746 . Thanks to Akos Vandra-Meyer.
2023-04-01 17:52:12 +01:00
Roger A. Light
63da7472b5
Fix default settings incorrectly allowing TLS v1.1.
...
Closes #2722 . Thanks to KramNamez.
2023-03-28 01:39:28 +01:00
Roger A. Light
6f61710fa7
Merge branch 'fixes' of github.com:Daedaluz/mosquitto into Daedaluz-fixes
2023-03-27 23:37:55 +01:00
Tobias Assarsson
2e2a420099
use CLOCK_BOOTTIME when available.
...
Signed-off-by: Tobias Assarsson <tobias.assarsson@gmail.com>
2023-03-02 09:04:59 +01:00
Roger Light
80a4063bb4
Merge pull request #2683 from guillaumepellegrino/fixes_memleak
...
Fix memory leak in mosquitto_tls_opts_set()
2022-12-07 22:41:29 +00:00
Roger A. Light
06d5835270
Add more WITH_BROKER guards.
2022-12-03 22:59:14 +00:00
Guillaume PELLEGRINO
9018f12dfc
Fix memory leak in mosquitto_tls_opts_set()
...
When calling mosquitto_tls_opts_set() multiple time in a row
on the same mosquitto context (Example: trying to reconnect
to mqtt broker), some of the tls options are not free, resulting in a memory leak.
The TLS options (tls_version, tls_ciphers) must be free before being set.
Signed-off-by: Guillaume PELLEGRINO <guillaume.pellegrino@yahoo.com>
2022-11-09 10:17:03 +01:00
Roger Light
7ff2198c7d
Merge pull request #2648 from impulsdampf22/fixes
...
Fixed empty string crash in mosquitto_property_copy_all
2022-11-03 18:43:13 +00:00
Roger A. Light
0cee0d1d11
Fix Coverity Scan 1486944 (backport from develop)
2022-10-26 10:06:38 +01:00
Alexander Fiebig
28416da47a
Fixed empty string crash in mosquitto_property_copy_all
...
Signed-off-by: Alexander Fiebig <alex.fiebig@online.de>
2022-10-08 19:08:21 +02:00
Roger A. Light
5c3c5d779f
Fix Coverity 1486949
2022-08-31 11:36:53 +01:00
Roger A. Light
49ebb58569
Fix failure to close thread in some situations.
...
Closes #2545 . Thanks to p-luke.
2022-08-15 22:17:00 +01:00
Roger A. Light
02b92b97ef
Fix use of MOSQ_OPT_SSL_CTX when used with MOSQ_OPT_SSL_CTX_DEFAULTS
...
Closes #2463 . Thanks to Tim Nordell.
2022-08-10 17:18:33 +01:00
Roger A. Light
6468bb4f9b
Fix documentation omission around mosquitto_reinitialise.
...
Closes #2489 . Thanks to rroguski
2022-08-10 14:31:34 +01:00
Roger A. Light
e979a46c04
Backport SSL connect fixes.
...
Closes #2594 .
Closes #2595 .
2022-08-09 21:25:54 +01:00
Roger A. Light
a913de2d28
Fix some PUBLISH messages not being counted in $SYS stats.
...
Closes #2448 . Thanks to Antoine.
2022-08-08 00:29:37 +01:00
Roger A. Light
0c9d9f2163
Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead.
...
Closes #2564 . Thanks to nmeum.
2022-08-07 23:04:46 +01:00
Roger A. Light
2e061afcc6
Fix build
2022-06-03 20:49:59 +01:00
Roger A. Light
ebfebf8708
Fix bridges not sending failure notification messages.
...
This is for messages to the local broker if the remote bridge connection
fails.
Closes #1488 .
Closes #2467 .
2022-05-25 16:23:35 +01:00
Roger A. Light
b6b8039914
Fix use of MOSQ_OPT_TLS_ENGINE
being unable to be used.
...
This was due to the openssl ctx not being initialised until starting to connect.
Closes #2537 . Thanks to chessing-c4.
2022-05-17 17:19:17 +01:00
Christian Salvasohn
4077987593
fix data race mosquitto_loop function
...
next_msg_out must be protected with the msgtime_mutex
as done everywhere else in the code else there is a data race
e.g. if mosquitto_publish is called from another thread
Signed-off-by: Christian Salvasohn <csalvasohn@gmx.de>
2022-04-13 20:05:35 +02:00
Roger A. Light
39f3030643
Fix client_generated flag not being copied on properties.
...
Closes #2401 . Thanks to Diorcet Yann.
2022-02-24 14:05:11 +00:00
Roger A. Light
96931643a4
Use strings.h for strcasecmp, except on Windows.
...
Closes #2420 . Thanks to Frédéric Fauberteau.
2022-02-24 12:02:16 +00:00
Roger A. Light
94fcd470d0
Fix incorrect subscribe_callback in mosquittopp.h.
...
Closes #2367 . Thanks to Jens Alfke.
2021-11-17 00:23:04 +00:00
Roger A. Light
11975332d4
Fix mosquitto_topic_matches_sub2() not using the length parameters.
...
Closes #2364 . Thanks to Jens Alfke.
2021-11-16 23:14:24 +00:00
Roger A. Light
f3590f3020
Don't pass NULL to printf %s.
...
This is undefined behaviour, and some platforms don't like it.
Issue #2355 . Thanks to CJ Lee.
2021-11-15 22:29:19 +00:00
Roger Light
68504da4a6
Merge pull request #2372 from podsvirov/install-libmosquitto-archive
...
Set ARCHIVE DESTINATION for mosquitto library
2021-11-15 21:39:03 +00:00
Konstantin Podsvirov
b34817cfab
Set ARCHIVE DESTINATION for mosquitto library
...
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:18:04 +03:00
Konstantin Podsvirov
6187143384
Set ARCHIVE DESTINATION for mosquittopp library
...
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:10:45 +03:00
Roger A. Light
7b614b3b59
Move to end of file on append, when on Windows.
2021-10-15 15:52:19 +01:00
Roger A. Light
be80a3f4d0
Fix client id not showing in log on failed connections, where possible.
2021-10-06 10:09:38 +01:00
Roger A. Light
a1a190b482
Pointless whitespace tidy.
2021-10-05 15:20:37 +01:00
Roger A. Light
0ce167c472
Fix log file being truncated on Windows.
2021-10-05 11:33:35 +01:00
Roger Light
3f62e80300
Merge pull request #2317 from doragasu/fixes_discon_cb_on_tls_err
...
Call disconnect callback on TLS error.
2021-10-01 17:27:39 +01:00
Roger A. Light
9e28eea0a2
Initialise sockpairR/W to invalid in mosquitto_reinitialise()
...
This avoids closing invalid sockets in `mosquitto_destroy()` on error.
Closes #2326 . Thanks to Arrigo Zanette.
2021-09-24 16:50:53 +01:00
Roger A. Light
330bf6efdc
Various fixes around inflight quota management.
...
Closes #2306 . Thanks to canique.
2021-09-22 17:20:24 +01:00
doragasu
4471ee9e47
Call disconnect callback on TLS error.
...
When using the library asynchronously, TLS errors caused e.g. because
of the date/time not set correctly, cause the connection to be silently
dropped without the disconnection callback being invoked, as described
in issue #1052 .
This commit fixes the issue, returning the behavior to the one the
library had previous to version 1.5.4, if a TLS error occurs, the
disconnect callback will be invoked for the client to get notified of
the error.
Signed-off-by: doragasu <doragasu@protonmail.com>
2021-09-16 17:06:55 +02:00
Roger A. Light
d09591d92e
Fix reconnecting in some cases when using MOSQ_OPT_TLS_USE_OS_CERTS.
...
Fix reconnecting failing when MOSQ_OPT_TLS_USE_OS_CERTS was in use, but none
of capath, cafile, psk, nor MOSQ_OPT_SSL_CTX were set, and
MOSQ_OPT_SSL_CTX_WITH_DEFAULTS was set to the default value of true.
Closes #2288 . Thanks to Poltorak Serguei.
2021-08-31 15:59:40 +01:00
Roger A. Light
605131502b
Fix MOSQ_OPT_SSL_CTX not being able to be set to NULL.
...
Closes #2289 . Thanks to Poltorak Serguei.
2021-08-31 10:45:10 +01:00