1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 12:40:26 +00:00
This commit is contained in:
Bernd Schoolmann
2025-10-16 12:55:55 +02:00
parent 79080566df
commit 1fb20e817b
3 changed files with 13 additions and 6 deletions

View File

@@ -23,11 +23,11 @@ impl UnlockedSshItem {
}
}
struct LockedKeyStore {
pub(crate) struct LockedKeyStore {
keys: Vec<LockedSshItem>,
}
struct UnlockedKeyStore {
pub(crate) struct UnlockedKeyStore {
keys: Vec<UnlockedSshItem>,
}
@@ -113,6 +113,7 @@ impl KeyStore {
None
}
#[allow(unused)]
pub fn is_locked(&self) -> bool {
matches!(self, KeyStore::Locked(_))
}

View File

@@ -61,7 +61,6 @@ async fn handle_connection(
}
};
span.in_scope(|| info!("Request {:x?}", request));
let Ok(request) = Request::try_from(request.as_slice()) else {
span.in_scope(|| error!("Failed to parse request"));
stream.write_reply(&AgentFailure::new().into()).await?;
@@ -112,9 +111,7 @@ async fn handle_connection(
}
}?;
let encoded: Vec<u8> = (&response).into();
span.in_scope(|| info!("Sending response"));
span.in_scope(|| info!("Response {:x?}", encoded));
stream.write_reply(&response).await?;
}
Ok(())

View File

@@ -93,6 +93,7 @@ impl TryFrom<&[u8]> for Request {
pub(crate) struct SshSignRequest {
public_key: PublicKey,
payload_to_sign: Vec<u8>,
#[allow(unused)]
parsed_sign_request: ParsedSignRequest,
flags: u32,
}
@@ -120,6 +121,7 @@ impl SshSignRequest {
&self.payload_to_sign
}
#[allow(unused)]
pub fn parsed_payload(&self) -> &ParsedSignRequest {
&self.parsed_sign_request
}
@@ -155,7 +157,10 @@ impl TryFrom<&[u8]> for SshSignRequest {
#[derive(Debug)]
pub(crate) enum ParsedSignRequest {
SshSigRequest { namespace: String },
#[allow(unused)]
SshSigRequest {
namespace: String,
},
SignRequest {},
}
@@ -236,9 +241,13 @@ impl From<String> for Extension {
/// bool is_forwarding
#[derive(Debug)]
struct SessionBindRequest {
#[allow(unused)]
host_key: PublicKey,
#[allow(unused)]
session_id: SessionId,
#[allow(unused)]
signature: Signature,
#[allow(unused)]
is_forwarding: bool,
}