generated from Shadow53/rust-template
Register and find keys on keys.openpgp.org or any other Hagrid keyserver
- Rust 94.8%
- HTML 5.2%
|
|
||
|---|---|---|
| src | adding OutOfMemory error value for C API | |
| tests | remove unused import | |
| .gitignore | add vim ws files to .gitignore | |
| build.rs | use cbindgen.toml config | |
| Cargo.toml | bump version number | |
| cbindgen.toml | generate decorated enum names to avoid name clashes | |
| LICENSE.txt | LGPL 2.1 or later | |
| README.md | we do not need this anymore, the default cargo build will do | |
Client implementation of the Verifying Keyserver (VKS) interface
Use this to download keys from https://keys.openpgp.org or any other Hagrid Key server implementation
Use this to upload keys to https://keys.openpgp.org or any other Hagrid Key server implementation and make them discoverable under an email address, respectively
Sample code
Use a Session to work with the protocol implementation like this:
usestd::fs;usevks_client::*;#[tokio::test]asyncfn register_test_key_for_test_address(){letOk(session)=Session::init()else{assert!(false);return;};letkeydata=fs::read_to_string("tests/koo_test.asc").expect("cannot read koo_test.asc");assert_eq!(session.submit_key_and_verify(keydata.as_bytes().to_vec(),"koo_test@dingens.org").await,Ok(()));}// When later a confirmation email arrives from the keyserver deliver it to the protocol
// implementation
session.verificaton_mail_received(maildata).await?;