Skip to content

Commit

Permalink
expose is_pageant_running
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Aug 19, 2024
1 parent 97dc08b commit ed1fec1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pageant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/lib.rs"]
license = "Apache-2.0"
name = "pageant"
repository = "https://github.com/warp-tech/russh"
version = "0.0.1-beta.1"
version = "0.0.1-beta.2"
rust-version = "1.65"

[dependencies]
Expand Down
4 changes: 4 additions & 0 deletions pageant/src/pageant_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ fn find_pageant_window() -> Result<HWND, Error> {
const _AGENT_COPYDATA_ID: u64 = 0x804E50BA;
const _AGENT_MAX_MSGLEN: usize = 8192;

pub fn is_pageant_running() -> bool {
find_pageant_window().is_ok()
}

/// Send a one-off query to Pageant and return a response.
pub fn query_pageant_direct(cookie: String, msg: &[u8]) -> Result<Vec<u8>, Error> {
let hwnd = find_pageant_window()?;
Expand Down

0 comments on commit ed1fec1

Please sign in to comment.