Skip to content

Failed to find and load 'cng' engine #456

@matbech

Description

@matbech

The readme says to put the cng.dll into the same directory as the osslsigncode.exe executable:
"To use the CNG engine with osslsigncode, ensure that the cng.dll library is placed in the same directory as the osslsigncode.exe executable."

However, osslsigncode.exe isn't able to load the library and fails with the following error:

error : Failed to find and load 'cng' engine
error : Failed to read key or certificates
error : 60170000:error:12800067:DSO support routines:win32_load:could not load the shared library:crypto\dso\dso_win32.c:108:filename(C:\vcpkg\packages\openssl_x64-windows\lib\engines-3\cng.dll)

From the error message it seems that the cng.dll is being loaded from a hard coded directory (the OpenSSL engine default directory).

It works when tricking osslsigncode.exe to load the engine from a path by adding a dot to the engine name:
.\cng
Reason:

if (strchr(id, '.')) {

Tested with version 2.10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions