mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
[PM-14993] Add ssh-agent error handling and security fixes (#12048)
* Add error handling and security fixes * Add is running status, and add more errors on windows
This commit is contained in:
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
@@ -71,6 +71,7 @@ export declare namespace sshagent {
|
||||
}
|
||||
export function serve(callback: (err: Error | null, arg: string) => any): Promise<SshAgentState>
|
||||
export function stop(agentState: SshAgentState): void
|
||||
export function isRunning(agentState: SshAgentState): boolean
|
||||
export function setKeys(agentState: SshAgentState, newKeys: Array<PrivateKey>): void
|
||||
export function lock(agentState: SshAgentState): void
|
||||
export function importKey(encodedKey: string, password: string): SshKeyImportResult
|
||||
|
||||
@@ -307,6 +307,12 @@ pub mod sshagent {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[napi]
|
||||
pub fn is_running(agent_state: &mut SshAgentState) -> bool {
|
||||
let bitwarden_agent_state = agent_state.state.clone();
|
||||
bitwarden_agent_state.is_running()
|
||||
}
|
||||
|
||||
#[napi]
|
||||
pub fn set_keys(
|
||||
agent_state: &mut SshAgentState,
|
||||
|
||||
Reference in New Issue
Block a user