commit 79a50d2b39104412f209ebcf452eec06c7bedb43
parent 27050e2bbc709708ca5773fe253e2aeae25aa615
Author: lash <dev@holbrook.no>
Date: Fri, 23 Sep 2022 17:46:25 +0000
WIP sign cli send entry with sequoia pgp lib
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main_send.rs b/src/main_send.rs
@@ -13,6 +13,7 @@ use sequoia_openpgp::cert::prelude::CertParser;
use sequoia_openpgp::parse::Parse;
use sequoia_openpgp::parse::PacketParser;
use sequoia_openpgp::policy::StandardPolicy;
+use sequoia_openpgp::packet::key::SecretKeyMaterial;
use wala::record::{ResourceKey};
use wala::auth::{AuthResult};
@@ -105,7 +106,8 @@ fn main() {
None => {},
}
- let mut match_fp: Vec<u8> = Vec::new();
+ //let mut match_fp: Vec<u8> = Vec::new();
+ let mut sk: Option<SecretKeyMaterial> = None;
if rk.v.len() > 0 {
let p = StandardPolicy::new();
let fp_stem = home_dir().unwrap();
@@ -125,7 +127,7 @@ fn main() {
.map(|kk| kk.key()) {
debug!("check key {} {}", k.fingerprint(), hex::encode(&auth_data.identity));
if k.fingerprint().as_bytes() == auth_data.identity {
- match_fp = auth_data.identity.clone();
+ sk = Some(k);
}
}
@@ -137,8 +139,6 @@ fn main() {
}
}
- info!("signing with {}", hex::encode(&match_fp));
-
let ua = AgentBuilder::new().build();
let r = ua.put(url.as_str())
.send_bytes(&d);