Software⏱️ 4 min read📅 2026-06-15

How to Fix: Adding custom engine in OpenSSL returns an error

Error fixing OpenSSL engine loading issue.

Quick Answer: Check the file permissions and ownership on the /opt/openssl-1.1.1d/lib/engines-1.1/gost.so file, ensure it's readable by the user running openssl.

Adding custom engine in OpenSSL can be a bit tricky, and the error message may not always provide clear information about the issue. This guide is intended for system administrators or IT professionals who have installed OpenSSL on their system and are experiencing issues with adding a custom engine.

The error message indicates that there is an issue with loading the shared library of the custom engine, despite it being present in the correct directory. This can be frustrating, especially when you're sure that the file exists and is correctly placed.

🛑 Root Causes of the Error

  • The primary reason for this error is that OpenSSL's dynamic library loading mechanism has issues with finding the shared library of the custom engine. This is likely due to a mismatch between the directory path specified in the configuration file and the actual location of the shared library.
  • Another possible cause could be related to the permissions or ownership of the shared library, which might prevent OpenSSL from accessing it correctly.

🛠️ Step-by-Step Verified Fixes

Fixing the issue by modifying the configuration file

  1. Step 1: Open the openssl.cnf file in a text editor and locate the line that specifies the dynamic path for the custom engine. It should look something like this: default_algorithms = ALL !gost_section dynamic_path = /opt/openssl-1.1.1d/lib/engines-1.1/gost.so
  2. Step 2: Change the value of dynamic_path to point to the correct location of the shared library, which is the same directory where you placed it (e.g., /opt/openssl-1.1.1d/lib/engines-1.1/). Make sure to update this line in all places where the openssl.cnf file is referenced.
  3. Step 3: Save the changes and close the file. Then, try loading the custom engine again using the command /opt/openssl-1.1.1d/bin/openssl engine.

Fixing the issue by setting correct permissions and ownership

  1. Step 1: Check the permissions of the shared library file (gost.so) to ensure that they are set correctly for the owner of the OpenSSL installation. You can use the 'ls -l' command to check the permissions.
  2. Step 2: If the permissions are not set correctly, you may need to change them manually using the 'chmod' command. Make sure to give the correct ownership to the file (usually the user running the OpenSSL installation).
  3. Step 3: After setting the correct permissions and ownership, try loading the custom engine again using the command /opt/openssl-1.1.1d/bin/openssl engine.

💡 Conclusion

By following these steps, you should be able to resolve the issue with adding a custom engine in OpenSSL. Remember to double-check your configuration file and permissions settings before trying again.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions