SQLEKM | Could not able to load provider dll in EKM

BHARDWAJ Bhuvendra 21 Reputation points
2021-07-06T11:51:34.667+00:00

I am unable to load provider DLL in SQLEKM. Below is the error appears on screen:
Msg 33027, Level 16, State 1, Line 10
Cannot load library 'C:\Program Files\Safenet\SQLEKM\safenetsqlekm.dll'. See errorlog for more information

Dll is signed and the folder where DLL is placed is also having all permissions.

This is happening after I have updated my provider DLL with some more changes, it involves updating the openssl version and other stuff also.
I was trying to debug it by putting logs in provider's entry function i.e DLLMain. But it seems that DLLMain function itself is not called because my logs were not working.
Please help me to identify the cause of this issue.

Note: Without the latest changes, I am able to load the DLL from the same place.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,420 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,451 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 11,336 Reputation points Microsoft Vendor
    2021-07-07T01:36:46.267+00:00

    With the updated DLL, Perhaps We didn't have the Visual C++ redistributeable installed as mentioned in the System requirements for SQL Server Extensible Key Management (EKM). This Q&A has the same error message But for another different DLL.
    And As mentioned in the linked page, You can use Process Monitor to find where the loading process failed.
    Finally, As the User Action Of MSSQLSERVER_33027 recommended, contact the cryptographic provider for more information.

    0 comments No comments

  2. BHARDWAJ Bhuvendra 21 Reputation points
    2021-07-07T11:43:58.843+00:00

    Try to find out the cause with process monitor, but it is not showing any information regarding provider dll.

    Tried to find out the difference between the working and non-working dll, there were USER32.dll and OLE32.dll which was missing in the failure one. This might be because we have updated the openssl library in provider.

    Could you please confirm, if these missing library can be the reason.

    0 comments No comments

  3. BHARDWAJ Bhuvendra 21 Reputation points
    2021-07-14T12:43:14.867+00:00

    Anyone please help on this.
    I have identified the cause of this issue. This is happening if I am updating the openssl library for the provider.
    Is there any dependency on OpenSSL by ekm dll?
    How can I debug more on this?

    0 comments No comments