# ocdm – OpenPGP Certificate Directory Manager `ocdm` is a command-line interface for managing [OpenPGP Certificate Directories][openpgp-cert-d]. [openpgp-cert-d]: https://datatracker.ietf.org/doc/draft-nwjw-openpgp-cert-d/ ## Quickstart ### Inspecting a Certificate Store ``` $ ocdm show OpenPGP Certificate Directory Path: /home/robin/.local/share/pgp.cert.d Tag: b7dac1e26600f804 Certificate count: 3 ``` ### Importing Certificates ``` $ ocdm import /tmp/91ffe0700e80619ceb73235ca88e23e377514e00.asc Certificate 91ffe0700e80619ceb73235ca88e23e377514e00 Primary user ID: Florian Pritz (Arch Linux Master Key) Imported certificate 91ffe0700e80619ceb73235ca88e23e377514e00 into store '/home/robin/.local/share/pgp.cert.d' $ cat /tmp/d8afdda07a5b6edfa7d8ccdad6d055f927843f1c.asc | ocdm import Certificate d8afdda07a5b6edfa7d8ccdad6d055f927843f1c Primary user ID: Levente Polyak (Arch Linux Master Key) Imported certificate d8afdda07a5b6edfa7d8ccdad6d055f927843f1c into store '/home/robin/.local/share/pgp.cert.d' ``` ### Listing Certificates ``` $ ocdm list 91ffe0700e80619ceb73235ca88e23e377514e00 Florian Pritz (Arch Linux Master Key) d8afdda07a5b6edfa7d8ccdad6d055f927843f1c Levente Polyak (Arch Linux Master Key) 69e6471e3ae065297529832e6ba0f5a2037f4f41 Johannes Löthberg (Arch Linux Master Key) 3572fa2a1b067f22c58af155f8b821b42a6fdcd7 Leonidas Spyropoulos (Arch Linux Master Key) 2ac0a42efb0b5cbc7a0402ed4dc95b6d7be9892e David Runge (Arch Linux Master Key) ``` ### Searching Certificates ``` $ ocdm search po d8afdda07a5b6edfa7d8ccdad6d055f927843f1c Levente Polyak (Arch Linux Master Key) 3572fa2a1b067f22c58af155f8b821b42a6fdcd7 Leonidas Spyropoulos (Arch Linux Master Key) $ ocdm search po leo 3572fa2a1b067f22c58af155f8b821b42a6fdcd7 Leonidas Spyropoulos (Arch Linux Master Key) $ ocdm search po d8 d8afdda07a5b6edfa7d8ccdad6d055f927843f1c Levente Polyak (Arch Linux Master Key) ```` ### Inspecting Certificates ``` $ ocdm show 2ac0a42efb0b5cbc7a0402ed4dc95b6d7be9892e Certificate 2ac0a42efb0b5cbc7a0402ed4dc95b6d7be9892e Primary user ID: David Runge (Arch Linux Master Key) ``` ### Selecting the Store Location ``` $ ocdm show --cert-store /tmp/pgp.cert.d OpenPGP Certificate Directory Path: /tmp/pgp.cert.d Tag: f62163b61ed1bc00 Certificate count: 1 $ PGP_CERT_D=/tmp/pgp.cert.d ocdm show OpenPGP Certificate Directory Path: /tmp/pgp.cert.d Tag: f62163b61ed1bc00 Certificate count: 1 ``` ## Installation To install `ocdm`, you need Rust 1.76.0 or later. Download the source code for the latest release and compile it with: ```text $ git clone https://codeberg.org/robink/ocdm.git $ cd ocdm $ git checkout stable $ cargo build --release --locked ``` It is recommended to verify the OpenPGP signature of the release before compiling and installing it: ``` $ git verify-commit stable ``` All releases should be signed with the key [`EC7E F0F9 B681 4C24 6236 3842 B755 6972 702A FD45`][openpgp-key]. [openpgp-key]: https://pgp.ireas.org/EC7EF0F9B6814C2462363842B7556972702AFD45.txt Alternatively, you can install `ocdm` directly from crates.io: ```text $ cargo install --locked ocdm ``` ## Acknowledgements `ocdm` uses the [`openpgp-cert-d`][], [`pgp`][] and [`rpgpie`][] crates to implement its features. Thanks to their developers for providing the building blocks for this tool! [`openpgp-cert-d`]: https://gitlab.com/sequoia-pgp/pgp-cert-d [`pgp`]: https://github.com/rpgp/rpgp [`rpgpie`]: https://codeberg.org/heiko/rpgpie ## Contact For bug reports, feature requests and other messages, please [open an issue][] for the `ocdm` project on Codeberg.org. [open an issue]: https://codeberg.org/robink/ocdm/issues ## License This project is licensed under the [GNU General Public License, Version 3.0][GPL-3.0] or later. The documentation and examples contained in this repository are licensed under the [Creative Commons Zero][CC0] license. For more information, see the license header in each file. You can find a copy of the license texts in the `LICENSES` directory. `ocdm` complies with [version 3.0 of the REUSE specification][reuse]. [GPL-3.0]: https://www.gnu.org/licenses/gpl-3.0.html [CC0]: https://creativecommons.org/publicdomain/zero/1.0/ [reuse]: https://reuse.software/practices/3.0/