Commit Graph

184 Commits (develop)

Author SHA1 Message Date
Roger A. Light 475a708d30 Fix openssl 3 deprecations. 3 years ago
Roger A. Light f70806f6e7 Don't try to set TCP_NODELAY for unix sockets. 3 years ago
Roger A. Light 57665e722d Remove obsolete openssl cleanup code 3 years ago
Roger A. Light d53653b017 Port from `fixes` 3 years ago
Roger A. Light d64331603c Don't use TLS v1.1 by default. 3 years ago
Roger A. Light fd68bf00c7 Merge branch 'master' into develop 3 years ago
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.
3 years ago
Roger A. Light e979a46c04 Backport SSL connect fixes.
Closes #2594.
Closes #2595.
3 years ago
Roger A. Light 0c9d9f2163 Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead.
Closes #2564. Thanks to nmeum.
3 years ago
Roger A. Light b5c77f264f Build fixes 4 years ago
Roger A. Light 500542351d Set pointers to NULL after freeing. 4 years ago
Roger Light cd07f1136b Bump copyrights. 4 years ago
Roger A. Light 8ac11929cc Merge branch 'master' into develop 4 years ago
Roger A. Light 799cdead15 Experimental custom websockets support. 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light aa29b45e70 Merge branch 'master' into develop 4 years ago
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.
4 years ago
Roger A. Light 376226c129 Build warning fixes. 4 years ago
Roger A. Light ea371564e7 Disable TLS 1.3 when using TLS-PSK, because it isn't correctly config'd. 4 years ago
Roger A. Light a37c8e65d2 TLS-PSK mismatch fix.
Produce an error if a TLS-PSK client tries to connect to a broker
that is not configured with TLS-PSK.
4 years ago
Roger A. Light 79542158f4 Fix `max_connections` option not being correctly counted. 4 years ago
Roger A. Light 49065f03a8 Merge remote-tracking branch 'origin/fixes' into develop 4 years ago
Roger A. Light e0bcf8cda4 Simplify SSL accept/connect. 4 years ago
Roger A. Light 403691ce40 Add missing return types. 4 years ago
Roger A. Light 625e2a5060 Refactor to remove duplicate code. 4 years ago
Roger Light 931c590a37
Merge pull request #2156 from abiliojr/improve_tls
add cipher settings for bridge, and support for TLS 1.3 ciphers
4 years ago
Roger A. Light 8a03b5ad5c Function for checking if a context is connected. 4 years ago
Roger Light 6ebbb4d654 Fix possible socket leak.
This would occur if a client was using `mosquitto_loop_start()`, then if
the connection failed due to the remote server being inaccessible they
called `mosquitto_loop_stop(, true)` and recreated the mosquitto object.

See: https://www.eclipse.org/forums/index.php?t=rview&goto=1839865#msg_1839865
5 years ago
Abilio Marques c637a192a3 add support for tlsv1.3 ciphers
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger A. Light 6e3738dcf0 Fix bridges not always connecting on Windows.
Closes #2043. Thanks to ttsorensen.
5 years ago
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 370cec5edd Fixes for lots of minor build warnings highlighted by Visual Studio. 5 years ago
Roger Light c604cf8fd0 net__write buf should be const. 5 years ago
Roger A. Light d8dcfd75fe lib: Fix DH group not being set for TLS connections.
This meant ciphers using DHE couldn't be used.

Closes #1925. Closes #1476. Thanks to Jonathan Sönnerup, Valerii
Demeshko, and sectokia.
5 years ago
Nikolay Raspopov 71845d28ac
Fixed some VS2017 compilation error and warnings (#1916)
* Fixed some VS2017 compilation errors and warnings.

Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
Roger A. Light 3731535298 Add SPDX license identifiers. 5 years ago
Roger A. Light b34dcd2a67 Final remove support for legacy libwebsockets
This means libwebsockets < 2.4.0.
5 years ago
Roger A. Light 29c771cdd4 Add lib and client support for OS CA certs
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and  trust OS provided CA certificates for use with TLS connections.
- All clients now load OS provided CA certificates if used with `-L
  mqtts://...`, or if port is set to 8883 and no other CA certificates are
  used. Closes #1824.
- Add the `--tls-use-os-certs` option to all clients.

Closes #1824. Thanks to Jens Reimann.
5 years ago
Roger A. Light 584cf51ba7 Update to EPL-2.0 5 years ago
Roger A. Light 4e3b8ed2b5 Fix cherry picked commit. 5 years ago
Roger A. Light 10ecae6275 Fix bridge sock not being removed from sock hash on error
Prior to this, duplicate entries could be added to the sock hash, which caused an infinite loop. Only affects bridges with bad settings on startup, and only when compiled using WITH_ADNS=yes.

Closes #1897. Thanks to Rodolfo Ochoa.
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 abbeb4494f Change `tls_version` option behaviour.
The `tls_version` option now defines the *minimum* TLS protocol version to
be used, rather than the exact version.

Closes #1258. Thanks to Daniele Sluijters.
5 years ago
Roger A. Light 4f61f6c161 Fix conversion errors. 5 years ago
Roger A. Light c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 5 years ago
Roger A. Light 56ba1b99db Add `mosquitto_ssl_get()`.
This allow clients to access their SSL structure and
perform additional verification.
5 years ago
Roger A. Light f180e923ef Merge branch 'lazy_ssl' of git://github.com/abiliojr/mosquitto into abiliojr-lazy_ssl 5 years ago
Roger A. Light 9b5112f547 Fix unsigned compared against 0.
Coverity Scan 1431132.
5 years ago
Abilio Marques d5aae3eca7 lazy init SSL
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger A. Light 762ad432e8 Fix support for openssl 3.0 5 years ago