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7WD2HDLVT5QG6QC
OU6JOR3CDZTH2H3NTGMV3WDIAWPD3VEJI7JRY3VJ7LPDR3QOA52QC
7P7G4J5ZT4S5BP6VAN226Z7CRZXEEVO5YHJ6IFMW27NHBR5TDJRAC
VWJ2JL63I5OYZ2HS3N4EKM5TW7HRAF5U3OAHDQIVZINIO73IAE7AC
STOFOQI47HS22EDKDFUFF4Z5NNZ6MXJFXETEZSITTOD7OYTETB2AC
MQ6ERQ43MWASF2OSG65FHKWHCWT35BJVFJWKHAFPVCTLICCTJWUAC
ABQDWHNGSBF2REQDCGXSBFAU4RUMXYAF2KHJ5O3D32M7Z3A3FEDAC
4RV7T4SRYIQLBW3EZFWBO5G65QAVG2GHPI4KMDDZERCX65KQWSPQC
7GQGVFEANEFOA2S5BVH5SVFLJKSJ3TLYWAEJGIX2TPASFHXGS4JAC
DFRNZLQ6APMFQUPOPG5BS4RYUBZI32UZVP7T4EKJ7VDGOB3KORCQC
use log::{debug, warn};
use pijul_interaction::{Confirm, Input, Select};
use thrussh_keys::key::PublicKey;
let identity_name = if self.identity.is_some() {
self.identity.clone().unwrap()
} else {
crate::identity::choose_identity_name(false).await?
};
let (key, _password) = crate::identity::Complete::load(&identity_name)?.decrypt()?;
let complete =
pijul_identity::Complete::load(&pijul_identity::choose_identity_name().await?)?;
let (secret, _) = complete.decrypt()?;
let identity_name = if self.identity.is_some() {
self.identity.clone().unwrap()
} else {
crate::identity::choose_identity_name(false).await?
};
let public_key = crate::identity::public_key(&identity_name);
let identity_name = self
.identity
.clone()
.unwrap_or(pijul_identity::choose_identity_name().await?);
let public_key = pijul_identity::public_key(&identity_name);
let public_key = pijul_identity::public_key(
.unwrap_or(pijul_identity::choose_identity_name().await?),
pijul_identity::Complete::load(&pijul_identity::choose_identity_name().await?)?
OutputFormat::Json => serde_json::to_writer_pretty(&mut stdout, &log_iter)?,
OutputFormat::Plaintext => {
log_iter.for_each(|entry| match write!(&mut stdout, "{}", entry) {
Ok(_) => Ok(()),
Err(e) if e.kind() == std::io::ErrorKind::BrokenPipe => Ok(()),
Err(e) => Err(e),
})?