Reputation: 10193
I'm trying to test an engine to talk to an HSM, but it fails spectacularly:
$ openssl engine -t dynamic -pre ~/Downloads/engine_openhsmd.so -pre ID:openhsmd
-pre LIST_ADD:1 -pre LOAD -pre ADDRESS_CONN:150.162.56.205
(dynamic) Dynamic engine loading support
[Failure]: /home/boppreh/Downloads/engine_openhsmd.so
3073775292:error:260AC089:engine routines:INT_CTRL_HELPER:invalid cmd name:eng_ctrl.c:134:
3073775292:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:eng_ctrl.c:316:
[Success]: ID:openhsmd
[Success]: LIST_ADD:1
[Success]: LOAD
[Failure]: ADDRESS_CONN:150.162.56.205
3073775292:error:260AC089:engine routines:INT_CTRL_HELPER:invalid cmd name:eng_ctrl.c:134:
3073775292:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:eng_ctrl.c:316:
Loaded: (openhsmd) OpenHSMd engine
[ unavailable ]
I can't understand a line of the output. What could be the source of the error?
Upvotes: 1
Views: 3572
Reputation: 10193
The engine path is a parameter and must be prefixed by the parameter name SO_PATH:
. Additionally the path must be absolute, but once you add the parameter name the resulting errors are easier to read.
$ openssl engine -t dynamic -pre SO_PATH:/home/boppreh/Downloads/engine_openhsmd.so
-pre ID:openhsmd -pre LIST_ADD:1 -pre LOAD -pre ADDRESS_CONN:150.162.56.205
(dynamic) Dynamic engine loading support
[Success]: SO_PATH:/home/boppreh/Downloads/engine_openhsmd.so
[Success]: ID:openhsmd
[Success]: LIST_ADD:1
[Success]: LOAD
[Success]: ADDRESS_CONN:150.162.56.205
Loaded: (openhsmd) OpenHSMd engine
[ available ]
Upvotes: 1