问题原文
原帖链接 · TrickyExplorer · CC BY-SA 4.0
I am trying to offload SSL process to AWS CloudHSM. While configuring the web server, when I add this:
ssl_engine cloudhsm;
to the top of the nginx configuration, nginx does not get restarted and the following error was logged:
2018/05/29 11:53:58 [emerg] 17509#0: ENGINE_by_id("cloudhsm") failed (SSL: error:25066067:DSO support routines:dlfcn_load:could not load the shared library:filename(/usr/lib/x86_64-linux-gnu/engines-1.1/cloudhsm.so): /usr/lib/x86_64-linux-gnu/engines-1.1/cloudhsm.so: cannot open shared object file: No such file or directory error:25070067:DSO support routines:DSO_load:could not load the shared library error:260B6084:engine routines:dynamic_load:dso not found error:2606A074:engine routines:ENGINE_by_id:no such engine:id=cloudhsm)
How do I resolve this?
已采纳解答
原帖链接 · lacabra · CC BY-SA 4.0
I experienced the same issue, and documented by findings and solution in this Github issue.
In summary, if you have followed the steps in:
- Install and Use the AWS CloudHSM Dynamic Engine for OpenSSL
- SSL/TLS Offload on Linux -> Step 3: Configure the Web Server
then you have CloudHSM configured correctly, and you can access it with your regular user, but the user that launches nginx cannot (which results in the misleading error that you report). See the solution post above for simple tests that you can run to verify that is indeed the case.
The solution is to track down how the server is started (see this answer to find out what init system your system uses), and make sure that the cloudhsm credentials are part of that environment. The instructions from AWS assume that the host runs systemd as the init system. In my case, I was using init and the solution involved tracking down the corresponding script and passing the credentials (n3fips_password) before launching nginx. Again the specific details are documented in the Github thread.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
