Issues Importing Root Certificates in Wine for MetaTrader 5 (MT5)

Questions about Wine on Linux
Locked
yanfedarovich
Newbie
Newbie
Posts: 1
Joined: Thu Oct 24, 2024 4:53 pm

Issues Importing Root Certificates in Wine for MetaTrader 5 (MT5)

Post by yanfedarovich »

Hello everyone,

I'm running MetaTrader 5 (MT5) through Wine in a Docker container and have encountered an issue with server authentication. I'm receiving the following error when trying to connect to a server:

Network '590115601': authorization on FxPro-MT5 Demo failed (Invalid server certificate or invalid local time)

I've ensured that:

The system time in both the container and Wine is correct.

I installed winetricks and followed commands to update and install certificates, such as winetricks -q secur32, but this didn't resolve the issue.

When I ran wine with the WINEDEBUG=+crypt32,+schannel,+wininet,+secur32 flags, the logs showed an error with importing system certificates into the Wine registry:

004c:err:crypt:CRYPT_ImportSystemRootCertsToReg Failed to import system certs into registry, 00000057

Additionally, after using winetricks secur32, the application stopped working altogether.

I also tried to manually import the certificates using commands like certutil, but I encountered errors and was unable to get it working. The error I get when trying to use certutil is: Can't recognize.

I've attempted to copy certificates directly into Wine's directories (~/.wine/drive_c), but I'm not sure where to place them properly or if this approach is even valid. I've tried using OpenSSL to convert .crt certificates to .der, but I'm still not sure how to import them into Wine without certutil working.

Has anyone else run into this issue or have any advice on how to properly import root certificates into Wine? I'd really appreciate any guidance on what else I could try.

Thanks in advance!
Locked