How to automatically download trusted root certificate authority

eric_s 0 Reputation points
2024-08-28T18:38:26.6466667+00:00

There is a difference in behavior with the open-source curl.exe, and the curl.exe natively included in Windows.

When making a request with Windows native curl.exe, if a trusted root certificate authority such as one listed here is not found in the local store, the request will still succeed and the certificate will be downloaded and added to the local store (accessed with certlm.msc)

When making the same request with the open-source curl.exe, and it is using the native store (--ca-native), the request will FAIL if the root certificate authority is not already in there.

How do I replicate this Windows native curl.exe behavior?

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,653 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Xu - MSFT 2,471 Reputation points Microsoft Vendor
    2024-08-29T02:16:38.29+00:00

    @eric_s Hello!

    Replicate this Windows native curl.exe behavior, what that means? Program it by its source code? I'm afraid you can't. You can just run and test it in like powershell.

    You can download the different versions of curl.exe for windows: https://curl.se/windows/


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.