Skip to content

MOSQ_OPT_SSL_CTX does not accept NULL, while option description allows it #2289

@PoltoS

Description

@PoltoS

https://mosquitto.org/api/files/mosquitto-h.html#mosquitto_opts_set

MOSQ_OPT_SSL_CTX | Pass an openssl SSL_CTX to be used when creating TLS connections rather than libmosquitto creating its own.  This must be called before connecting to have any effect.  If you use this option, the onus is on you to ensure that you are using secure settings.  Setting to NULL means that libmosquitto will use its own SSL_CTX if TLS is to be used.  This option is only available for openssl 1.1.0 and higher.

NULL should be allowed, but the mosquitto_opts_set and mosquitto_void_option functions exits with MOSQ_ERR_INVALID
https://github.com/eclipse/mosquitto/blob/8589f082d80d9e24c9b326729cc5372549bc8513/lib/options.c#L385

https://github.com/eclipse/mosquitto/blob/8589f082d80d9e24c9b326729cc5372549bc8513/lib/options.c#L496

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: libmosquittoStatus: CompletedNothing further to be done with this issue, it can be closed by the requestor or committer.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions