Closed geebinge closed 4 months ago
It appears from your comment that you are leveraging the relative path to the -Dhsm_custom_lib
. Instead, could you attempt to follow the scenario using the absolute path and verify the outcome?
The documentation states:
When specifying the path used with
-Dhsm_custom_lib
in the following command, make sure to use the absolute path to the library in thecmake
directory you previously created.
if I do it with the absolute path, the result stays the same.
cmake -Duse_prov_client=ON ..
cmake --build .
cmake -Duse_prov_client:BOOL=ON -Dhsm_type_custom=ON -Dhsm_custom_lib="/home/$USER/azure-iot-sdk-c/cmake/provisioning_client/samples/custom_hsm_example/libcustom_hsm_example.a" .
cmake --build .
We found the issue on our own. The way we add the certs into the code was the wrong one. The whole cert chain must be part of static const char* const CERTIFICATE = "-----BEGIN CERTIFICATE-----""\n" in the custom hsm example.
/usr/share/ca-certificates/
does not work, at least not in our case.
I have an issue with the demo you provided at https://learn.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-x509?tabs=linux&pivots=programming-language-ansi-c
I have installed Ubuntu 20.04 and try it now 2 times (1st with main and 2nd time with lts_03_2024), always with the same issue. Everything works fine until I run the sample.
I use OpenSSL 1.1.1f 31 Mar 2020. lts_03_2024 https://github.com/Azure/azure-iot-sdk-c.git Ubuntu 20.04.6 LTS
The build I did in that way.