Adding and Distrusting Certificates
Add a certificate authority when the machine needs to trust an authority outside the shipped set. Distrust a certificate to exclude it even if a package or local addition supplies it.
Before you start #
- Install and start trustd and the
trustcommand. - Obtain write access to the relevant keys under
Machine\System\Trust\Certificates. - Verify the intended certificate's fingerprint through a trusted channel.
- Identify the applications affected by the change and how they obtain trust.
trust(1) owns command syntax. The regman entry for
Machine\System\Trust\Certificates owns the registry schema.
In Security Policy #
Use Security Policy's certificate views to inspect effective roots, additions,
and distrust decisions. Graphical changes use the same registry permissions
as trust. Verify the resulting store and affected applications after using
either interface.
Trusting a certificate authority #
-
Inspect
trust statusandtrust listbefore making a change. -
Obtain the intended certificate as a single PEM or DER file. The following example assumes it is saved as
corp-root.pemin the current directory: -
Follow Verify the Change.
The name identifies the local addition. The command rejects an invalid, expired, or non-authority certificate before writing it. trustd validates certificates again when composing the store.
To withdraw this named addition:
Removing an addition does not create a distrust decision. Another source can still supply the same certificate.
Purposes #
An addition defaults to ServerAuth, used to validate TLS servers. Choose
other purposes only when intended. For example:
Socket queries can filter by purpose. Compatibility bundles and hashed
files include only roots carrying ServerAuth. Applications using other
purposes must request and enforce the appropriate policy themselves.
Distrusting a certificate authority #
- Find the intended certificate with
trust listand inspect it withtrust show. Compare the full SHA-256 fingerprint, not only its subject. - Run
trust distrustwith that fingerprint or its unambiguous prefix. Use--reasonto record why it is being excluded; seetrust(1). - Check the durable decision with
trust list --distrusted, then verify the effective result below.
A complete fingerprint can record a distrust before the machine has that certificate. A later bundle or addition cannot make it trusted while the distrust remains.
To remove a distrust, use trust restore with its fingerprint. Removing
the decision does not supply a certificate that is absent from both the
shipped bundle and local additions.
Verify the change #
- Run
trust status. Resolve degraded health using the procedure below. - Run
trust list. For an addition, inspect its complete fingerprint, source, and purposes withtrust show. - For a distrust, confirm that the root is absent from the effective set
and that
trust list --distrustedcontains the decision. - Retest the affected application. If it caches trust, refresh that state using the application's documented procedure.
A registry write records intent. A socket query confirms the daemon's set. Neither proves that a running application has discarded a cached root or that compatibility rendering succeeded.
Doing it from the registry #
The trust command uses ordinary registry operations. A domain policy can
write the same keys; it does not need a separate trust mechanism.
When creating an addition manually, write Certificate last. trustd skips
an entry without that value so that the other metadata can be prepared
first. Use the regman schema rather than inferring value types from examples.
Package-provided trust {#packages-may-offer-trust-never-take-it} #
Package-provided trust decisions belong in inert registry seeds. Installing files must not silently widen machine trust. Applying a seed is an explicit image or administrative policy action.
A private application store is separate from the machine store. Its contents and refresh behavior belong to that application's documentation.
When the store is degraded #
-
Read the error from
trust statusand preserve the failing operation or path for diagnosis. -
Correct the cause. Repair a missing or invalid root bundle through its package. Correct an unreadable registry configuration or unintended distrust decision without restoring an intentionally excluded root.
-
If rendering failed, inspect the paths the affected application uses. Reported rendered paths can describe an earlier successful render; they are not a fresh inventory after failure. Do not edit generated files.
-
With trustd's control permission, run:
-
Confirm healthy status, verify the intended change, and retest the application.
An authorized reload returns an error if refresh leaves degraded health.
The registry decision remains recorded. Service-manager reload uses SIGHUP;
its completion does not report the result of recomposition, so inspect
trust status afterward.
Skipped invalid certificates are reported separately from degraded health. Read the warnings and correct the named entries before relying on them.