Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
PoltoS opened this issue Aug 25, 2021 · 1 comment
Closed
Labels
Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@PoltoS
Copy link

PoltoS commented Aug 25, 2021

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

if(!mosq || !value) return MOSQ_ERR_INVAL;

if(!mosq || !value) return MOSQ_ERR_INVAL;

@ralight ralight added Component: libmosquitto Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug labels Aug 31, 2021
@ralight ralight added this to the 2.0.12 milestone Aug 31, 2021
@ralight
Copy link
Contributor

ralight commented Aug 31, 2021

Thank you, you're quite right.

@ralight ralight closed this as completed Aug 31, 2021
@ralight ralight reopened this Aug 31, 2021
@ralight ralight added Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. and removed Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. labels Aug 31, 2021
@ralight ralight closed this as completed in 6051315 Sep 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants