How do you regenerate client certificates for localhost?

This is with LXD 3.17.

I think the basic question is how do I regenerate client certificates for the localhost.

I am trying to run the following API call: curl -v ‘https://127.0.0.1:8443//1.0/images?recursion=1’ which is resulting in a “SSL certificate problem: unable to get local issuer certificate” problem.

Based on the documentation, I removed the contents of ~/.config/lxc/* in an effort to force regeneration of the certificates. But regeneration is not happening despite stopping/starting the LXD snap.

What am I missing, and how do I fix it?

Thx in advance,

-steve

Hi!

The deb package of LXD keeps the client configuration in ~/.config/lxc/.
However, the snap package of LXD keeps the client configuration in ~/snap/lxd/current/.config/lxc/.

Therefore, have a look into ~/snap/lxd/current/.config/lxc/.