-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit 6981c15
committed
Add
Creates an OpenPGP certificate based on the SSH key and allows signing files
emitting OpenPGP framed packets.
Requires that the first key in SSH is ed25519 (see `ssh-add -L`).
Generate a key with:
`cargo run --example pgp-wrapper generate "John Doe <john@example.com>" > key.pgp`
Sign data using:
`cargo run --example pgp-wrapper sign < Cargo.toml > Cargo.toml.sig`
Import the certificate using GnuPG:
```sh
$ gpg --import key.pgp
gpg: key A142E92C91BE3AD5: public key "John Doe <john@example.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
```
Verify the signature using GnuPG:
```sh
$ gpg --verify Cargo.toml.sig
gpg: assuming signed data in 'Cargo.toml'
gpg: Signature made Fri May 10 11:15:53 2024 CEST
gpg: using EDDSA key 4EB27E153DDC454364B36B59A142E92C91BE3AD5
gpg: Good signature from "John Doe <john@example.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4EB2 7E15 3DDC 4543 64B3 6B59 A142 E92C 91BE 3AD5
```
Works perfectly in conjunction with `openpgp-card-agent.rs`!
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>pgp-wrapper
example1 parent bd36287 commit 6981c15Copy full SHA for 6981c15
File tree
Expand file treeCollapse file tree
3 files changed
+968
-10
lines changedFilter options
- examples
Expand file treeCollapse file tree
3 files changed
+968
-10
lines changed
0 commit comments