Both "extern crate" and #[macro_use] are artifacts of earlier editions of Rust language. Nowadays we can entirely rely on "use" instead. Changes: - Replace "extern crate" with "use" imports. - Replace #[macro_use] extern crate ...; declarations with "use" imports of used macros. For example, #[macro_use] extern crate anyhow; was replaced with use anyhow::anyhow; in every file where anyhow! macro were used. - Favor direct usage of import path instead of aliased one. For example, in many places "sequoia_opengpg" were aliased as "openpgp", during imports replacements I tried to avoid usage of "openpgp" or introduced additional aliases (like "use sequoia_openpgp as openpgp") and used "sequoia_opengpg". I think this way it is easier to understand where name came from instead of search and jumping to lib.rs or main.rs files trying to find where name were aliased. Another example of such favoring is usage of "hagrid_database" over the "database" in imports. NOTE: the usage is still inconsistent and requires further clean up.
Hagrid
Hagrid is a verifying OpenPGP key server.
You can find general instructions and an API documentation at the running instance at https://keys.openpgp.org.
Please note that Hagrid is built and maintained only for the service at keys.openpgp.org. It is not maintained or officially supported as deployable software.
Compatibility note: Hagrid v2.0 uses an sqlite certificate store instead of the previous file based database. This means that it also no longer supports serving certificates directly via reverse proxy. You can us hagridctl to dump and import an old database.
License
Hagrid is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Hagrid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with Hagrid. If not, see https://www.gnu.org/licenses/.
Quick Start
Building Hagrid requires a working stable Rust toolchain. The easiest way to get the toolchain is to download rustup.
Additionally, some external dependencies are required. Get them (on Debian or Ubuntu) with
sudo apt install gnutls-bin libssl-dev gcc llvm-dev libclang-dev build-essential pkg-config gettext libsqlite3-dev
After Rust and the other dependencies are installed, copy the config file, then simply compile and run:
cd hagrid
cp Rocket.toml.dist Rocket.toml
cargo run
This will spawn a web server listening on port 8080.
For deployment, a release build should be used (cargo build --release
). This
will be statically built, and can be copied anywhere. You will also need to
adjust Rocket.toml
accordingly. Hagrid uses sendmail
for mailing, so you
also need a working local mailer setup.
Community
We're in #hagrid
on OFTC IRC, also reachable via Matrix as #hagrid:stratum0.org
.