Commit Graph

46 Commits

Author SHA1 Message Date
Roger A. Light
a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
2021-01-20 11:46:18 +00:00
Roger A. Light
3731535298 Add SPDX license identifiers. 2020-12-01 20:46:56 +00:00
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.
2020-12-01 11:51:13 +00:00
Roger A. Light
584cf51ba7 Update to EPL-2.0 2020-11-25 17:34:21 +00:00
Roger A. Light
4f61f6c161 Fix conversion errors. 2020-10-17 01:23:08 +01:00
Roger A. Light
9724710cd6 Add MOSQ_OPT_BIND_ADDRESS.
This allows setting of a bind address independently of the
`mosquitto_connect*()` call.
2020-10-14 10:31:46 +01:00
Roger A. Light
d96543c0b8 Merge branch 'fixes' into develop 2020-03-03 12:54:57 +00:00
Roger A. Light
b0a065f790 Update changelog. Release page. Bump copyright. 2020-02-27 23:26:58 +00:00
Roger A. Light
27b4518d7e Improve password file parsing in the broker and mosqitto_passwd.
Closes #1584. Thanks to panava.
2020-02-04 16:38:51 +00:00
Roger A. Light
d60e86d2a3 Add TCP_NODELAY support to lib and clients.
Closes #1526. Thanks to Felix Moessbauer.
2019-12-18 17:04:43 +00:00
Roger A. Light
4b6cc208e2 Fix inflight max behaviour and option setting. 2019-09-24 11:26:25 +01:00
Roger A. Light
f21ccc362b Fix mosquitto_string_option(, MOSQ_OPT_TLS_KEYFORM, ) return value
`mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.

Closes #1360. Thanks to Michael Dombrowski.
2019-07-30 18:46:52 +01:00
Roger Light
44d170053d
Merge pull request #1255 from etactica/ssl-fixes
Ssl fixes for ENGINE and UI includes
2019-05-29 10:34:11 +01:00
Roger A. Light
b4dfeb3767 Fix MQTT v5 clients not being able to specify a password without a username.
Thanks to Erik Moqvist.

Closes #1274.
2019-05-21 23:56:22 +01:00
Karl Palsson
22303848e2 ssl: support openssl with ENGINE support disabled.
Alternatively, just drop support for this config.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-05-02 16:44:14 +00:00
Roger A. Light
449103e960 Merge remote-tracking branch 'refs/remotes/origin/fixes'
Conflicts:
	ChangeLog.txt
2019-04-17 17:51:34 +01:00
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>
2019-04-04 17:27:52 -07:00
Roger A. Light
1220ba4bfe Rejig OCSP code. 2019-03-26 22:13:42 +00:00
Roger A. Light
ea046c2405 Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master 2019-03-26 18:36:13 +00:00
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
2019-03-16 10:05:38 +00:00
Roger A. Light
8d513afffb Add missing mosquitto_userdata function. Closes #1191. 2019-03-07 10:18:38 +00:00
Roger A. Light
cd07c2b802 Windows build fixes. 2019-03-05 14:01:29 +00:00
Roger A. Light
ce31269e05 Update changelog, bump version, bump copyright year. 2019-02-28 16:56:15 +00:00
Roger A. Light
1924afe49e Add explicit support for TLS v1.3 and drop TLS v1.0. 2019-02-27 22:50:01 +00:00
Roger A. Light
5aabc171b0 Merge branch 'mqtt5' into develop 2019-02-26 18:51:31 +00:00
Roger A. Light
e862a047a8 Rework TLS engine support. 2019-02-26 17:11:29 +00:00
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>
2019-02-26 15:50:37 +00:00
Nicolás Pernas Maradei
f88cc06435 Add TLS engine and keyform support to libmosquitto
- Clients can now offload crypto tasks to an external crypto device through
  the OpenSSL ENGINE API.
- The keyfiles can now be treated as PEM or ENGINE keys.
- Two new functions were added to libmosquitto to set up the previously
  mentioned features.
- Both mosquitto_sub and mosquitto_pub include support to turn on the mentioned
  features through command line options.

Signed-off-by: Nicolás Pernas Maradei <nicopernas@gmail.com>
2019-02-26 15:48:00 +00:00
Roger Light
84660e1cbe Send maximum limits for QoS>0.
This needs more work on the broker front to simplify the design.
2019-01-08 18:38:47 +00:00
Roger Light
67c1d4453e Receive maximum support for clients. 2019-01-08 14:24:41 +00:00
Roger Light
0546e7bebc Add mosquitto_int_option and mosquitto_void_option
This deprecates mosquitto_opts_set().
2019-01-08 14:21:02 +00:00
Roger A. Light
fcf4cd0b27 Merge branch 'master' into mqtt5 2018-12-19 14:11:11 +00:00
Roger A. Light
a00dd29af8 Fix building where TLS-PSK is not available.
Closes #68.
2018-12-11 10:55:31 +00:00
Roger A. Light
5d02f58151 Fix reconnect delay backoff behaviour.
Closes #1027. Thanks to Harm Verhagen.

Bug: https://github.com/eclipse/mosquitto/issues/1027
2018-12-04 17:19:31 +00:00
Roger A. Light
0123ff1efe Rename *_with_properties() -> *_v5(). 2018-11-22 18:55:04 +00:00
Roger A. Light
f9e0fa246a Validate properties coming into client library. 2018-11-01 18:53:06 +00:00
Roger A. Light
383608613a Client+lib will property support. 2018-11-01 11:37:57 +00:00
Roger A. Light
561513fdd4 Very simple v5 CONNECT support - no properties. 2018-09-19 11:00:15 +01:00
Roger A. Light
8410a19335 Add fallback case for libressl. 2018-05-02 21:51:08 +01:00
Roger A. Light
6c7ecd7e97 Fix compiling without TLS. 2018-05-02 21:04:42 +01:00
Roger A. Light
b2bb48ac2b Reference counting for openssl 1.0.2. 2018-04-16 22:39:37 +01:00
Roger A. Light
574fb36ede More utf-8 validation. 2018-04-13 17:42:16 +01:00
Roger A. Light
2d9fab123e Use SSL_CTX_up_ref() with MOSQ_OPT_SSL_CTX*.
This limits the use of those options to openssl 1.1.0 and greater.
2018-04-12 01:15:30 +01:00
Roger A. Light
24d68b5af8 Remove support for openssl 1.0.0 and 1.0.1.
These are no longer supported by openssl.
2018-04-11 17:12:25 +01:00
Roger A. Light
8470ca89b9 Add MOSQ_OPT_SSL_CTX and MOSQ_OPT_SSL_CTX_WITH_DEFAULTS options.
Closes #567 and #715.
2018-04-11 16:34:24 +01:00
Roger A. Light
28dd14fcea Separate out functions from mosquitto.c to aid discoverability. 2018-04-11 15:04:17 +01:00