我试图测试引擎与HSM交谈,但它失败了:
$ 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 ]
我无法理解输出的一行。可能是错误的根源是什么?
答案 0 :(得分:1)
引擎路径是一个参数,必须以参数名SO_PATH:
为前缀。此外,路径必须是绝对路径,但是一旦添加参数名称,结果错误就更容易阅读。
$ 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 ]