nrfutil toolchain-manager "Error: Failed to retrieve toolchain-index" due to corporate SSL/TLS inspection

Could you provide details on how the nrfutil toolchain-manager makes its internet requests?  Or even better, how to add certificates to be trusted in making its TLS connections? 

Our corporate internet security systems are causing the connections to fail, and we need to know what framework is used by the toolchain-manager so that we can work with our IT to resolve or workaround it.  Here are some examples of such workarounds for other development tools (Python PIP, NPM, etc.): https://help.zscaler.com/zia/adding-custom-certificate-application-specific-trust-store 

For context the nrfutil toolchain-manager gives us this error:

C:\>nrfutil toolchain-manager search
Error: Failed to retrieve toolchain-index

Caused by:
0: Failed to download index
1: Get request failed
2: developer.nordicsemi.com/.../index-windows-x86_64.json: Connection Failed: tls connection init failed: invalid peer certificate: UnknownIssuer
3: invalid peer certificate: UnknownIssuer

Or a similar error via the nRF Connect VS Code extension, in that case "Failed to fetch available toolchains." is the high-level error that pops up, but the accompanying console output shows same error as nrfutil toolchain-manager gives on command-line.

I have seen other DevZone posts (such as  "Failed to fetch available toolchains." on Visual Studio Code  ) with same error, but none of them explain how to add trusted certificates so the download works on a network employing SSL/TLS inspection.

Again this is not an issue with the nrfutil toolchain-manager or nRF Connect VS Code extension itself.  But do need to know more about how it works to enable us to get it to work as intended in our corporate environment.

Parents
  • Hi,

    Do you use WSL or virtual machine? If so, this discussion might be relevant.

    Best regards,
    Dejan

  • Thanks for the response.  No, this is directly in Windows.  We need to find a way to add our certificates into the network call(s) that nrfutil toolchain-manager is making.

  • Unfortunately this version still does not obey to the proxy setup.  Don't know how   did it

    hardy@debian-hardy:~/.nrfutil/bin$ nrfutil --detect-proxy --log-level=trace --log-output=stdout --json toolchain-manager search
    {"type":"log","data":{"level":"INFO","message":"nrfutil (version = 7.7.0, platform = x86_64-unknown-linux-gnu) invoked with --detect-proxy --log-level=trace --log-output=stdout --json toolchain-manager search ","timestamp":"2024-02-12T09:33:21.296Z"}}
    {"type":"log","data":{"level":"INFO","message":"Trying to detect proxy configuration automatically...","timestamp":"2024-02-12T09:33:21.296Z"}}
    {"type":"log","data":{"level":"INFO","message":"Using proxy helper program from '/home/hardy/.nrfutil/proxy_utils/proxy'","timestamp":"2024-02-12T09:33:21.296Z"}}
    {"type":"log","data":{"level":"INFO","message":"Running '/home/hardy/.nrfutil/proxy_utils/proxy developer.nordicsemi.com' to detect proxy configuration","timestamp":"2024-02-12T09:33:21.296Z"}}
    {"type":"log","data":{"level":"INFO","message":"Proxy configuration detected","timestamp":"2024-02-12T09:33:21.297Z"}}
    {"type":"log","data":{"level":"DEBUG","message":"Setting environment variable NRFUTIL_EXEC_PATH to /home/hardy/.nrfutil/bin/nrfutil for subcommand `toolchain-manager`","timestamp":"2024-02-12T09:33:21.297Z"}}
    {"type":"log","data":{"level":"INFO","message":"nrfutil-toolchain-manager (version = 0.14.1, platform = x86_64-unknown-linux-gnu) invoked with --json --log-level TRACE --log-output stdout search ","timestamp":"2024-02-12T09:33:21.300Z"}}
    {"type":"log","data":{"level":"DEBUG","message":"Constructing the configuration from the defaults","timestamp":"2024-02-12T09:33:21.300Z"}}
    {"type":"log","data":{"level":"DEBUG","message":"Current config: Config { install_dir: \"/home/hardy/ncs\", toolchain_index: None }","timestamp":"2024-02-12T09:33:21.300Z"}}
    {"type":"log","data":{"level":"INFO","message":"Downloading from "timestamp":"2024-02-12T09:33:21.300Z"}}">developer.nordicsemi.com/.../index-linux-x86_64.json","timestamp":"2024-02-12T09:33:21.300Z"}}
    {"type":"log","data":{"level":"DEBUG","message":"connecting to developer.nordicsemi.com:443 at 104.20.251.111:443","timestamp":"2024-02-12T09:33:21.326Z"}}
    {"type":"log","data":{"level":"INFO","message":"Failed to retrieve cached index: Failed to get cache","timestamp":"2024-02-12T09:33:51.331Z"}}
    Error: Failed to retrieve toolchain-index

    Caused by:
       0: Failed to download index
       1: Get request failed
       2: developer.nordicsemi.com/.../index-linux-x86_64.json: Network Error: timed out reading response
       3: timed out reading response

  •  The new toolchain-manager binary worked for me because I wasn't having proxy-related connections problems (this is a separate issue).  I am behind a corporate TLS inspection system that requires installation of company-specific root certs for clients to trust or cert validation fails.  The new binary is successfully using the locally installed trusted certs, the released one does not.

  • Hi,

    We have released new version which contains updates included in previously provided exe/binary (solving problem with native certificates) and fix for proxy networks. It can be installed using nrfutil command "nrfutil install toolchain-manager".

    Best regards,
    Dejan

  • Thanks  !  Appreciate this being updated in the main toolchain-manager.  This does indeed work in conjunction with the SSL_CERT_FILE environment variable to use a custom certificate bundle.

Reply Children
No Data
Related