Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
There was a problem hiding this comment.
🟡 Changes recommended
Fix legacy-profile selection so empty roots fall back to XDG discovery.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
src/Shared/CertificateGeneration/UnixCertificateManager.cs:1098
- Checking only whether the legacy root exists suppresses XDG discovery even when that root contains no usable
*.default*profile. A stale or empty~/.mozilla/firefoxdirectory therefore makes--trustskip the real XDG profile; select the legacy root only when profile enumeration finds a profile, then fall back to the XDG root.
var firefoxDirectory = GetLegacyDirectory(homeDirectory);
if (!Directory.Exists(firefoxDirectory))
{
firefoxDirectory = GetXdgDirectory(homeDirectory, xdgConfigHome);
}
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Tested by a user on Fedora 44 and verified cert trust works for a default Firefox install and they were able to apply trust to a Firefox fork by setting a |
Support XDG Firefox NSS databases in dev-certs
Support Firefox XDG profiles and typed NSS database overrides
Description
Firefox on newer Linux distributions can store profiles under the XDG configuration directory instead of the legacy
~/.mozillalocation. This preventeddotnet dev-certs --trustfrom finding and updating those NSS databases.This change moves browser-specific NSS conventions into Firefox and Chromium implementations and adds Firefox discovery under
$XDG_CONFIG_HOME/mozilla/firefoxwith legacy-profile precedence.NSS database overrides
On Linux,
DOTNET_DEV_CERTS_NSSDB_PATHSnow supports explicit browser types for each colon-delimited NSS database path:firefox=applies Firefox NSS semantics, including theC,,trust attributes required by Firefox. This can be used for Firefox-derived browsers such as Zen that keep profiles in custom locations.chromium=applies Chromium NSS semantics, including theP,,trust attributes and server-certificate validation behavior.Coverage includes default and configured XDG paths, legacy precedence, typed and untyped overrides, empty entries, and override replacement. An end-to-end Linux container smoke test also built the in-tree tool, populated real NSS databases, verified matching certificate fingerprints, confirmed Firefox
C,,and ChromiumP,,trust attributes, and passed--check --trustplus Chromiumcertutil -V -u Vvalidation.Resolves #67127