Fix OpenSSL3 crypto lib load of rest plugin #223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To deconz-rest-plugin was added the feature to use install codes for pairing (e.g. used by Bosch Smart Home devices).
The docker for amd64 uses the Ubuntu deb package.
This seems to be linked against
libcrypto.so
, whereas Debian docker base provides onlylibcrypto.so.3
library link.Unfortunately the code does not log any failure on library loading.
After identification and test the problem was resolved by adding the required symlink
libcrypto.so -> libcrypto.so.3
to the Docker container.After that joining devices that require install codes works like a charm.
Method that adds install code support:
RestDevices::putDeviceInstallCode
(https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/rest_devices.cpp#L1029)
Utility function that uses OpenSSL 3 crypto library w/o failure logging of missing library:
CRYPTO_GetMmoHashFromInstallCode
(https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/crypto/mmohash.cpp#L99)