Install certificates on WSL2

You might come across a situation where you want to add some certificates in your WSL instance to fix any SSL issues. You need to first copy your certificates to the location /usr/local/share/ca-certificates and then run the command sudo update-ca-certificates

Things to Remember

  • While exporting the certificates, make sure you select the base64 encoded option. (DER encoded doesn't seem to work for me)

  • When copying the certificates to wsl, change the extension to crt