How to avoid «Your connection is not private» / `NET::ERR_CERT_AUTHORITY_INVALID` for localhost in Windows 10?

2023-06-08--18-21-34

A post was merged into an existing topic: How to build a certificates chain of trust using openssl?

NET::ERR_CERT_AUTHORITY_INVALID means that the root certificate is invalid or absent.
In my case, the root certificate was absent because I reinstalled Windows.