Skip to content

Nheko not using system native certificate store on Windows #1967

@Rumena-Beloglazova

Description

@Rumena-Beloglazova

Describe the bug

Hello, I am setting up a matrix server for my workplace intranet. I manage our own private certificate authority and all the client workstations have the root CA installed in their respective OS stores.

The issue arises when I launch Nheko for the first time on any of the Windows machines, click register or login, and type in the address of the homeserver. In the client it says Autodiscovery failed. Unknown error while requesting .well-known. and in nheko.log it says:

[2025-10-31 09:57:26.635] [net] [error] Autodiscovery failed. Unknown error when requesting .well-known. (connection: SSL connect error)

Image

If i open my web browser (firefox, which also has the root CA imported as firefox maintains its own certificate store) and navigate to https://<matrix server address>/, it connects just fine and I can see the placeholder text served by the matrix server. if i navigate to https://<matrix server address>/.well-known/matrix/client in firefox, it serves me the (lack of a) file perfectly fine

Image

After searching through issues and PRs on this github page, it's my understanding that Curl is used for networking. So I downloaded Curl for Windows and attempted to fetch https://<matrix server address>

Image

I read the documentation at https://curl.se/docs/sslcerts.html, and then tried again after telling curl to use the native OS store for certificates

Image

as you can see it connects and fetches the placeholder text perfectly fine now.

I should mention that the Linux workstations have had none of these issues, nheko has been working perfectly fine there. this is a windows-specific issue

To Reproduce

  1. set up a matrix homeserver behind a reverse proxy with TLS managed by your own Certificate Authority
  2. import your root CA into a windows system's certificate store
  3. launch Nheko on that Windows system and attempt to connect to your homeserver

What happened?

Fails to connect, logging an SSL error

Expected behavior

connect and continue as normal

Screenshots

No response

Version

v0.11.3 (windows 7) v0.12.1 (windows 10/11)

Operating system

Windows

Installation method

No response

Qt version

No response

C++ compiler

No response

Desktop Environment

No response

Did you use profiles?

  • Profiles used?

Relevant log output

Backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions