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

CLI tools cannot use an OpenSSL engine #2537

Closed
chessing-c4 opened this issue May 16, 2022 · 1 comment
Closed

CLI tools cannot use an OpenSSL engine #2537

chessing-c4 opened this issue May 16, 2022 · 1 comment
Labels
Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug

Comments

@chessing-c4
Copy link

It is not possible to use an OpenSSL engine with the CLI tools included with Mosquitto.

In mosquitto_string_option() in options.c, there is a call to ENGINE_by_id() that will always fail because OpenSSL isn't initialized until we call connect.

Commenting out the ENGINE_by_id() call (and related) in options.c, and just having it copy the engine name in to the mosq->tls_engine member, and returning success is all that is necessary to get it working. This seems to align with the other string options handled in that file, but does remove the check to see if the engine is valid.

I have verified that this problem exists at least in versions 2.0.10 through 2.0.14.

ralight added a commit that referenced this issue May 18, 2022
This was due to the openssl ctx not being initialised until starting to connect.

Closes #2537. Thanks to chessing-c4.
@ralight ralight added Component: libmosquitto Type: Bug Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. labels May 23, 2022
@ralight ralight closed this as completed Aug 11, 2022
@jmcclure0921
Copy link

This issue still exists when using libmosquitto on version 2.0.15

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 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

3 participants