TRUST(1)

πŸ’– NAME πŸ’–

trust β€” the Tool for operating on the trust policy store ✨

(and just so we're clear, this is a User Commands page, section 1 of the manual, okay bestie? 🫢)


πŸ“œ SYNOPSIS πŸ“œ

trust list

trust extract --filter=<what> --format=<type> /path/to/destination

trust anchor /path/to/certificate.crt

trust dump

trust check-format /path/to/file.p11-kit...

🌸 DESCRIPTION 🌸

okay so trust is a command line tool that lets you examine and modify the shared trust policy store. main character energy fr πŸ’…

scroll down for the various sub commands. but first, the global options that work everywhere:

  • -v, --verbose β€” Run in verbose mode with debug output. it's giving "tell me everything" πŸ”
  • -q, --quiet β€” Run in quiet mode without warning or failure messages. shhh 🀫

πŸŽ€ LIST πŸŽ€

List trust policy store items. slay.

$ trust list

Lists info about all the various items in the trust policy store. Every item gets listed with it's PKCS#11 URI plus some descriptive information. no cap πŸ’–

you can pass these options to control what gets listed:

  • --filter=<what> β€” Specifies what certificates to extract. here's what you can put in:
    • ca-anchors β€” Certificate anchors
    • trust-policy β€” Anchors and blocklist (default)
    • blocklist β€” Distrusted certificates
    • certificates β€” All certificates
    • pkcs11:object=xx β€” A PKCS#11 URI to filter with
If an output format is chosen that cannot support the type what has been specified by the filter, a message will be printed. 😭
also, none of the available formats support storage of blocklist entries that do not contain a full certificate. so any certificates distrusted by their issuer and serial number alone are not included in the extracted blocklist. periodt πŸ’€
  • --purpose=<usage> β€” Limit to certificates usable for the given purpose. pick one of these:
    • server-auth β€” For authenticating servers
    • client-auth β€” For authenticating clients
    • email β€” For email protection
    • code-signing β€” For authenticated signed code
    • 1.2.3.4.5... β€” An arbitrary purpose OID

βš“ ANCHOR βš“

Store or remove trust anchors. iconic behaviour honestly πŸ‘‘

$ trust anchor /path/to/certificate.crt
$ trust anchor --remove /path/to/certificate.crt
$ trust anchor --remove "pkcs11:id=%AA%BB%CC%DD%EE;type=cert"

Store or remove trust anchors in the trust policy store. these are usually root certificate authorities, bestie 🌳

specify either the --store or --remove operation. if you specify no operation at all, --store is assumed.

When storing, one or more certificate files are expected on the command line. they get stored as anchors, unless they are already present. (we don't do duplicates around here πŸ’…)

When removing an anchor, either specify certificate files or PKCS#11 URI's on the command line. matching anchors will be removed.

It may be that this command needs to be run as root in order to modify the system trust policy store, if no user specific store is available. so like, if it's not working, that's probably why πŸ™ˆ

you can specify the following options:

  • --remove β€” Remove one or more anchors from the trust policy store. Specify certificate files or PKCS#11 URI's on the command line.
  • --store β€” Store one or more anchors to the trust policy store. Specify certificate files on the command line.

πŸ“¦ EXTRACT πŸ“¦

Extract trust policy from the shared trust policy store. let's get it out of there ✨

$ trust extract --format=x509-directory --filter=ca-anchors /path/to/directory

you can specify the following options to control what to extract. the --filter and --format arguments should be specified. and by default this command will not overwrite the destination file or directory. (protective, we love that 🫢)

  • --comment β€” Add identifying comments to PEM bundle output files before each certificate.
  • --filter=<what> β€” Specifies what certificates to extract. your options are:
    • ca-anchors β€” Certificate anchors (default)
    • trust-policy β€” Anchors and blocklist
    • blocklist β€” Distrusted certificates
    • certificates β€” All certificates
    • pkcs11:object=xx β€” A PKCS#11 URI
If an output format is chosen that cannot support the type what has been specified by the filter, a message will be printed. 😭
and again, none of the available formats support storage of blocklist entries that do not contain a full certificate. so any certificates distrusted by their issuer and serial number alone are not included in the extracted blocklist. iykyk πŸ’€
  • --format=<type> β€” The format of the destination file or directory. pick one of these cuties:
    • x509-file β€” DER X.509 certificate file
    • x509-directory β€” directory of X.509 certificates
    • pem-bundle β€” File containing one or more certificate PEM blocks
    • pem-directory β€” Directory of PEM files each containing one certificate
    • pem-directory-hash β€” Directory of PEM files each containing one certificate, with hash symlinks
    • openssl-bundle β€” OpenSSL specific PEM bundle of certificates
    • openssl-directory β€” Directory of OpenSSL specific PEM files
    • java-cacerts β€” Java keystore 'cacerts' certificate bundle
  • --overwrite β€” Overwrite output file or directory. (go ahead, be bold πŸ’…)
  • --purpose=<usage> β€” Limit to certificates usable for the given purpose. choose from:
    • server-auth β€” For authenticating servers
    • client-auth β€” For authenticating clients
    • email β€” For email protection
    • code-signing β€” For authenticated signed code
    • 1.2.3.4.5... β€” An arbitrary purpose OID

🌈 EXTRACT COMPAT 🌈

Extract compatibility trust certificate bundles. the "make it work with the old girlies" command 🧚

$ trust extract-compat

so here's the thing: OpenSSL, Java and some versions of GnuTLS cannot currently read trust information directly from the trust policy store. this command extracts trust information such as certificate anchors for use by these libraries. bestie behaviour, honestly πŸ’œ

What this command does, and where it extracts the files, is distribution or site specific. Packagers or administrators are expected to customize this command.


πŸ” DUMP πŸ”

Dump PKCS#11 items in the various tokens. spill the tea, tokens β˜•

$ trust dump

Dumps information about the various PKCS#11 items in the tokens. every item gets dumped with it's PKCS#11 URI and information in the .p11-kit persistence format.

you can specify the following options to control what to dump:

  • --filter=<what> β€” Specifies what certificates to extract. your choices:
    • all β€” All objects. This is the default
    • pkcs11:object=xx β€” A PKCS#11 URI to filter with

βœ… CHECK FORMAT βœ…

Check the format of .p11-kit files. vibe check but for files 🎯

$ trust check-format /path/to/file.p11-kit...

Administrators sometimes need to write a custom .p11-kit file to amend the trust information. this is an error prone process, because the file format is mainly for machine processing. so administrators can use this command to check whether a file has a correct .p11-kit format. you're welcome πŸ’–

This command takes an arbitrary number of files as an input. Each file is then analysed and any mismatch with the .p11-kit format is reported on the standard error output. After the file is processed a check result is printed on the standard output. two streams, two jobs, we stan a multitasker ✨


πŸ› BUGS πŸ›

Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://github.com/p11-glue/p11-kit/issues/. don't be shy, they wanna hear it πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie!! this absolute icon of a manual page comes to you from p11-kit, and it's the TRUST(1) page. now go forth and trust responsibly πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from