# SSL Error even after adding certificate

**URL:** https://discourse.nixos.org/t/ssl-error-even-after-adding-certificate/30674
**Category:** Help
**Created:** [July 19, 2023, 10:44am UTC](https://discourse.nixos.org/t/ssl-error-even-after-adding-certificate/30674 "2023-07-19T10:44:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rorobiw](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/r/a587f6/32.png) [@rorobiw](https://discourse.nixos.org/u/rorobiw)
#### Post date: [July 19, 2023, 10:44am UTC](https://discourse.nixos.org/t/ssl-error-even-after-adding-certificate/30674/1 "2023-07-19T10:44:37Z")

</div>

even when adding the company .crt I still get ssl errors:

```auto
NIX_SSL_CERT_FILE=/etc/ssl/certs/company-ca.crt nix run nixpkgs#neofetch

```

```auto
unable to download 'https://cache.nixos.org/fy44ba2xkhzk63lw3bnlfa4bijxr73y2.narinfo': SSL peer certificate or SSH remote key was not OK (60); retrying in 330 ms

```

i am using nixos-wsl on windows 10

---

<div class="post-metadata">

### Author: ![johncoopertr](https://discourse.nixos.org/user_avatar/discourse.nixos.org/johncoopertr/32/32441_2.png) [@johncoopertr](https://discourse.nixos.org/u/johncoopertr)
#### Post date: [May 19, 2025, 9:04pm UTC](https://discourse.nixos.org/t/ssl-error-even-after-adding-certificate/30674/2 "2025-05-19T21:04:57Z")

</div>

> [@NixOs in corporate](https://discourse.nixos.org/t/nixos-in-corporate/50041/10):
>
> Hi all, I ran into the same issue - hopefully this is helpful for you guys or someone else: find the Zscaler root cert in your browser, export it. Set nix.settings.ssl-cert-file explicitly to /etc/ssl/certs/ca-bundle.crt Use security.pki.certificates to grab the .crt file we exported earlier. From what I understand, security.pki.certificates will stick the exported .crt into /etc/ssl/certs/ca-bundle.crt at build time.
