3. Is it possible to use the system’s keychain to save the private key of the root certificate? I apologies if this is a naive question, I’m not an experienced Mac developer :)
Technically, yes, it is possible. However, AdGuard generates a unique private key and stores it encrypted for a reason -- so that third-party apps could not access and read or modify it.
4. Can you shorten the valid duration of the root certificate and rotate it frequently? For example, 6 months limitation for the root cert and 3 months for every domain cert.
Here is how it works in the current version:
- AdGuard calculates a hash of the server certificates and uses it as a key in its own encrypted certs storage
- If there's no cert for this hash in the storage, it generates a new one and stores it there
- It's "not_after" date is set to the same value as the original cert had
- Once it expires, it is removed from the storage
With this approach, we can be sure that whenever the domain certificate is changed, AG will reevaluate it, and generate a new certificate.
On the other hand, rotating domain certificates more often does make sense to me, we should consider doing it.
Re-generating the root certificate is also possible, but tbh I don't see much sense in doing it.