mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 12:40:26 +00:00
Cleanup
This commit is contained in:
@@ -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(_))
|
||||
}
|
||||
|
||||
@@ -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(())
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user