First dispatcher
- Create (sub)command structure. - First experimental dispatcher to start the daemon.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
//
|
||||
// Some defaults
|
||||
//
|
||||
|
||||
pub const CONFIG_FILE_LOCATION: &'static str = "/etc/husk/config.toml";
|
||||
@@ -8,7 +8,7 @@ use anyhow;
|
||||
use sequoia_openpgp::policy::StandardPolicy;
|
||||
use std::path::PathBuf;
|
||||
use sequoia_openpgp::Cert;
|
||||
use sequoia_cert_store::{CertStore, StoreUpdate};
|
||||
use sequoia_cert_store::CertStore;
|
||||
use sequoia_directories::Home;
|
||||
|
||||
use crate::{config::HuskConfig, crypto};
|
||||
@@ -58,7 +58,7 @@ impl<'hc> HuskContext<'hc> {
|
||||
}
|
||||
|
||||
pub async fn add_recipient(&mut self, rcpt: String) {
|
||||
|
||||
|
||||
let certs = crypto::get_certificates(&self, rcpt.as_str()).await;
|
||||
|
||||
self.mail.add_recipient(rcpt, certs)
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
use sequoia_wot as wot;
|
||||
use wot::{CertSynopsis, Certification};
|
||||
use sequoia_openpgp::{policy::StandardPolicy, Cert, KeyID};
|
||||
use sequoia_openpgp::policy::StandardPolicy;
|
||||
use sequoia_openpgp::Cert;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Introducer {
|
||||
@@ -44,7 +45,7 @@ impl Introducer {
|
||||
u.certifications().for_each(|s| {
|
||||
if s.signature_alive(None, None).is_ok() {
|
||||
s.issuers().for_each(|i| {
|
||||
if i == &my_keyid { result = true; }
|
||||
if i == &my_keyid { result = true; }
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
pub mod defaults;
|
||||
pub mod husk_context;
|
||||
pub mod mail_context;
|
||||
pub mod errors;
|
||||
pub mod recipient;
|
||||
pub mod introducer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user