Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Sep 13, 2024
1 parent f16d538 commit 9c45481
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/cmd/renc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use eyre::Result;
use eyre::{eyre, Result};
use spdlog::{debug, info, trace};
use std::{
path::{Path, PathBuf},
Expand Down Expand Up @@ -58,7 +58,7 @@ impl Secret {

impl Profile {
pub fn renc(self, all: bool) -> Result<()> {
use age::ssh;
use age::{ssh, x25519};
let secret_paths: Vec<PathBuf> = self
.secrets
.into_values()
Expand All @@ -69,6 +69,17 @@ impl Profile {

let recip_host_pubkey = ssh::Recipient::from_str(self.settings.host_pubkey.as_str());

let recip_master_pub_ident_res_list: Vec<eyre::Result<x25519::Recipient>> = self
.settings
.master_identities
.iter()
.map(|i| {
x25519::Recipient::from_str(i.pubkey.as_str())
.map_err(|i| eyre!("master identity pubkey {} invalid", i))
})
.collect();
// x25519::Recipient::from_str()

debug!("age ssh recipients: {:?}", recip_host_pubkey);

Ok(())
Expand Down

0 comments on commit 9c45481

Please sign in to comment.