feat: update example ssh agent

This commit is contained in:
2022-04-25 00:35:52 +08:00
parent 9b35e28819
commit bae59b745e
3 changed files with 10 additions and 60 deletions

View File

@@ -8,7 +8,7 @@ use openssl::pkey::PKey;
use openssl::pkey::Private;
use openssl::rsa::Rsa;
use openssl::sign::Signer;
use rust_util::information;
use rust_util::{debugging, information};
use ssh_agent::agent::Agent;
use ssh_agent::proto::{from_bytes, RsaPublicKey, to_bytes};
use ssh_agent::proto::message::{self, Message, SignRequest};
@@ -58,7 +58,7 @@ impl KeyStorage {
let n = with_sign(rsa.n().to_vec());
ssh_key.extend_from_slice(&(n.len() as u32).to_be_bytes()[..]);
ssh_key.extend_from_slice(&n);
information!("{:?}", ssh_key);
debugging!("{:?}", ssh_key);
information!("ssh-rsa {} {}", base64::encode(&ssh_key), ident.comment);
Self {
identities: RwLock::new(vec![ident])