mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-16 17:35:04 +01:00
signature
This commit is contained in:
parent
a52b6b37d7
commit
3f0b367c39
3 changed files with 16 additions and 1 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -796,6 +796,16 @@ dependencies = [
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pem"
|
||||||
|
version = "3.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
|
||||||
|
dependencies = [
|
||||||
|
"base64",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pem-rfc7468"
|
name = "pem-rfc7468"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
|
|
@ -1192,6 +1202,7 @@ dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"eyre",
|
"eyre",
|
||||||
"hex",
|
"hex",
|
||||||
|
"pem",
|
||||||
"rpassword",
|
"rpassword",
|
||||||
"sha2",
|
"sha2",
|
||||||
"ssh-agent-client",
|
"ssh-agent-client",
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,4 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
rpassword = "7.3.1"
|
rpassword = "7.3.1"
|
||||||
sha2 = "0.10.8"
|
sha2 = "0.10.8"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
|
pem = "3.0.4"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use std::path::PathBuf;
|
use std::{io::Write, path::PathBuf};
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use eyre::{bail, Context};
|
use eyre::{bail, Context};
|
||||||
|
|
@ -97,6 +97,9 @@ async fn main() -> eyre::Result<()> {
|
||||||
};
|
};
|
||||||
|
|
||||||
let signature = agent.sign(&key.key_blob, &file, 0).await?;
|
let signature = agent.sign(&key.key_blob, &file, 0).await?;
|
||||||
|
|
||||||
|
let signature = pem::encode(&pem::Pem::new("SSH SIGNATURE", signature));
|
||||||
|
std::io::stdout().write_all(signature.as_bytes())?;
|
||||||
}
|
}
|
||||||
Subcommand::Lock => {
|
Subcommand::Lock => {
|
||||||
let passphrase =
|
let passphrase =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue