Skip to content

Commit 89a42d2

Browse files
committed
feat: 0.2.0 — rename Gitway* types to Anvil* with #[deprecated] aliases
Implements PRD §7.4 versioning ramp step 0.2.0 and resolves Q6: the three flat re-exports at the crate root drop their inherited Gitway* prefix. Renamed: * GitwaySession -> AnvilSession * GitwayConfig -> AnvilConfig * GitwayError -> AnvilError (GitwayConfigBuilder also renamed to AnvilConfigBuilder; reachable via anvil_ssh::config::AnvilConfigBuilder, no flat re-export at the crate root in 0.1 or 0.2.) The rename touches every source file that referenced the old names — struct definitions, doc-comments, tests, the throughput benchmark, the README + CLAUDE + AGENTS scaffolding, and the CHANGELOG entry for 0.2.0. All internal references now use the new Anvil* names; rustfmt re-flowed two functions in src/hostkey.rs and src/keygen.rs because the shorter type names changed line widths. Backwards compat: * lib.rs adds three #[deprecated] re-exports so consumers that wrote `use anvil_ssh::GitwaySession;` against 0.1.x continue to compile with a deprecation warning. Aliases stay for one major version per PRD §7.4; removed in 1.0.0. * The downstream Gitway workspace bumps its `anvil-ssh` pin and renames its in-source `GitwaySession` references to drop the warnings (separate PR; not in this commit). Verification (Windows + Rust 1.88, after `cargo clean`): * cargo build --release --locked: PASS * cargo test --lib --tests --locked: 58 passed, 0 failed, 1 ignored (52 lib unit + 2 test_clone + 4 test_connection) * cargo clippy --locked --all-targets -- -D warnings: PASS * cargo fmt --all --check: PASS * cargo publish --dry-run --locked: PASS (anvil-ssh v0.2.0 packages cleanly, 322.6 KiB / 90.5 KiB compressed, 34 files) Doctest harness note: 4 of 10 doctests fail locally on Windows with E0462 (`staticlib delegate instead of rlib`) and "aws_lc_rs not available in rlib format". Pre-existing Windows + complex-deps doctest harness quirk; the same source compiled fine in 0.1.0 with warm cache. CI runs the full `cargo test` (including doctests) on Linux + macOS where this issue does not manifest. Lockfile note: bumping the package version requires regenerating the lockfile entry (`anvil-ssh v0.1.0` -> `v0.2.0`). Done as part of the Cargo.toml bump; no other lockfile changes.
1 parent b20593e commit 89a42d2

22 files changed

Lines changed: 355 additions & 315 deletions

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Pure-Rust SSH stack for Git tooling: transport, keys, signing, agent. Foundatio
2828
1. Find the provider's official SSH host key fingerprint documentation page.
2929
2. Add `const DEFAULT_<PROVIDER>_HOST: &str` and `const <PROVIDER>_FINGERPRINTS` to `src/hostkey.rs`.
3030
3. Add a `fingerprints_for_host` match arm covering the new host constant.
31-
4. Add a `GitwayConfig::<provider>()` convenience constructor in `src/config.rs`.
31+
4. Add a `AnvilConfig::<provider>()` convenience constructor in `src/config.rs`.
3232
5. Add tests for the new provider in `hostkey.rs`.
3333
6. Update `CLAUDE.md` with the new fingerprint rotation URL.
3434
7. Open a PR; downstream consumers (Gitway and friends) bump their pinned `anvil-ssh` version on next release.
@@ -50,9 +50,9 @@ Pure-Rust SSH stack for Git tooling: transport, keys, signing, agent. Foundatio
5050

5151
## Type rename roadmap
5252

53-
- `v0.1.x` — types stay `GitwaySession` / `GitwayConfig` / `GitwayError` (zero-rename extraction; downstream churn limited to crate-name change).
54-
- `v0.2.0` — rename to `AnvilSession` / `AnvilConfig` / `AnvilError` with `#[deprecated]` aliases. Aliases stay for one major version.
55-
- `v1.0.0` — stabilization; cut concurrently with Gitway 1.0.0.
53+
- `v0.1.x` — types carried over from the source crate as `GitwaySession` / `GitwayConfig` / `GitwayError` to keep the lift-and-shift extraction zero-rename. Downstream churn limited to crate-name change.
54+
- `v0.2.0` (current) — types renamed to `AnvilSession` / `AnvilConfig` / `AnvilError`. Legacy `Gitway*` names retained as `#[deprecated]` re-exports for one major version.
55+
- `v1.0.0` — stabilization; cut concurrently with Gitway 1.0.0. Deprecated `Gitway*` aliases removed.
5656

5757
## Versioning
5858

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
All notable changes to Anvil are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [SemVer](https://semver.org/).
44

5+
## [0.2.0] — 2026-05-03
6+
7+
### Changed
8+
9+
- **Breaking (with deprecated aliases):** the three flat re-exports at the crate root were renamed to drop the inherited `Gitway*` prefix:
10+
- `GitwaySession``AnvilSession`
11+
- `GitwayConfig``AnvilConfig`
12+
- `GitwayError``AnvilError`
13+
14+
The legacy names remain available as `#[deprecated]` re-exports for one major version (per [Gitway PRD §7.4](https://github.com/steelbore/gitway/blob/main/Gitway-PRD-v1.0.md)), so consumers that depended on `anvil-ssh = "0.1"` continue to compile with a deprecation warning until they migrate. Migration is mechanical:
15+
16+
```rust
17+
// before
18+
use anvil_ssh::{GitwayConfig, GitwaySession, GitwayError};
19+
// after
20+
use anvil_ssh::{AnvilConfig, AnvilSession, AnvilError};
21+
```
22+
23+
The deprecated aliases will be removed in `1.0.0`.
24+
25+
- The `GitwayConfigBuilder` type returned by `AnvilConfig::builder()` is also renamed to `AnvilConfigBuilder`. It is reachable via `anvil_ssh::config::AnvilConfigBuilder`; no flat re-export at the crate root in either 0.1 or 0.2 (consumers typically obtain it through `AnvilConfig::builder()`).
26+
27+
### Notes
28+
29+
- All internal references in `src/` (struct definitions, doc-comments, tests) have been updated to the new names. `cargo build`, `cargo test`, `cargo clippy --all-targets -- -D warnings`, and `cargo fmt --check` all pass on the renamed source.
30+
- Downstream tracking issue: the [Steelbore/Gitway](https://github.com/Steelbore/Gitway) workspace bumps its `anvil-ssh` pin to `0.2.0` in a follow-up PR and renames its in-source `GitwaySession`/`Config`/`Error` references to drop the deprecation warnings.
31+
532
## [0.1.0] — 2026-05-03
633

734
### Added
@@ -18,5 +45,5 @@ All notable changes to Anvil are documented here. Format follows [Keep a Change
1845

1946
### Notes
2047

21-
- Type names (`GitwaySession`, `GitwayConfig`, `GitwayError`) carry forward from the source crate unchanged. They will be renamed to `AnvilSession` / `AnvilConfig` / `AnvilError` in `0.2.0` with `#[deprecated]` aliases. See [Gitway PRD §7.4](https://github.com/steelbore/gitway/blob/main/Gitway-PRD-v1.0.md) for the extraction plan.
48+
- Type names carried forward from the source crate as `GitwaySession` / `GitwayConfig` / `GitwayError` to keep the lift-and-shift extraction zero-rename. These were superseded in 0.2.0 (see above); the legacy names remain available as `#[deprecated]` re-exports for one major version per [Gitway PRD §7.4](https://github.com/steelbore/gitway/blob/main/Gitway-PRD-v1.0.md).
2249
- This is a *cold-start* extraction: the new repo's git history starts here. Per-commit history of the original library remains in [steelbore/gitway](https://github.com/steelbore/gitway)`git blame` and historical context for any line of code can be found there.

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ The `ssh-key` RustCrypto stack (`ed25519-dalek` 2.x, `rsa` 0.9, `p256`/`p384`/`p
8383

8484
## Type rename roadmap
8585

86-
- `v0.1.x` — types stay `GitwaySession` / `GitwayConfig` / `GitwayError`. Doc-comments and `use` paths reference `anvil_ssh::` (Rust module path), but the type names retain their `Gitway*` prefix.
87-
- `v0.2.0` — rename types to `Anvil*` with `#[deprecated]` aliases for one major version.
88-
- `v1.0.0` — stabilization (concurrent with Gitway 1.0.0).
86+
- `v0.1.x` — types carried over from the source crate as `GitwaySession` / `GitwayConfig` / `GitwayError` (lift-and-shift extraction; only the crate name changed).
87+
- `v0.2.0` (current) — types renamed to `AnvilSession` / `AnvilConfig` / `AnvilError`. Legacy `Gitway*` names retained as `#[deprecated]` re-exports at the crate root.
88+
- `v1.0.0` — stabilization (concurrent with Gitway 1.0.0). Deprecated `Gitway*` aliases removed.
8989

9090
## Related
9191

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-3.0-or-later
22
[package]
33
name = "anvil-ssh"
4-
version = "0.1.0"
4+
version = "0.2.0"
55
edition = "2021"
66
license = "GPL-3.0-or-later"
77
authors = ["Mohamed Hammad <MJ@S3cure.me>"]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ anvil-ssh = "0.1"
1616
```
1717

1818
```rust,no_run
19-
use anvil_ssh::{GitwayConfig, GitwaySession};
19+
use anvil_ssh::{AnvilConfig, AnvilSession};
2020
2121
#[tokio::main]
22-
async fn main() -> Result<(), anvil_ssh::GitwayError> {
23-
let config = GitwayConfig::github();
24-
let mut session = GitwaySession::connect(&config).await?;
22+
async fn main() -> Result<(), anvil_ssh::AnvilError> {
23+
let config = AnvilConfig::github();
24+
let mut session = AnvilSession::connect(&config).await?;
2525
session.authenticate_best(&config).await?;
2626
let exit_code = session.exec("git-upload-pack 'steelbore/gitway.git'").await?;
2727
session.close().await?;
2828
Ok(())
2929
}
3030
```
3131

32-
The type names (`GitwaySession`, `GitwayConfig`, `GitwayError`) are inherited from the source crate. They will be renamed to `AnvilSession` / `AnvilConfig` / `AnvilError` in `0.2.0` with `#[deprecated]` aliases for one major version.
32+
The flat re-exports `AnvilSession` / `AnvilConfig` / `AnvilError` were renamed in `0.2.0` from the legacy `GitwaySession` / `GitwayConfig` / `GitwayError` (which were carried over from the source crate to keep the 0.1.0 extraction zero-rename). The legacy names remain available as `#[deprecated]` re-exports for one major version per [Gitway PRD §7.4](https://github.com/steelbore/gitway/blob/main/Gitway-PRD-v1.0.md); they will be removed in `1.0.0`. Migration is mechanical — `s/Gitway/Anvil/g` in your `use anvil_ssh::*;` imports.
3333

3434
## Modules
3535

benches/throughput.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use std::process::Command;
2626
use std::time::Instant;
2727

28-
use anvil_ssh::{GitwayConfig, GitwaySession};
28+
use anvil_ssh::{AnvilConfig, AnvilSession};
2929
use criterion::{criterion_group, criterion_main, Criterion};
3030

3131
/// Returns `true` when the integration environment variable is set.
@@ -47,8 +47,8 @@ fn bench_gitway_exec(c: &mut Criterion) {
4747
c.bench_function("gitway_exec", |b| {
4848
b.iter(|| {
4949
rt.block_on(async {
50-
let config = GitwayConfig::github();
51-
let mut session = GitwaySession::connect(&config)
50+
let config = AnvilConfig::github();
51+
let mut session = AnvilSession::connect(&config)
5252
.await
5353
.expect("gitway connect");
5454
session

src/agent/askpass.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use std::time::Duration;
3535
use tokio::process::Command;
3636
use tokio::time::timeout;
3737

38-
use crate::GitwayError;
38+
use crate::AnvilError;
3939

4040
/// Hard cap for how long the daemon will wait on an askpass reply.
4141
///
@@ -89,10 +89,10 @@ pub async fn confirm(prompt: &str) -> bool {
8989
///
9090
/// # Errors
9191
///
92-
/// Returns [`GitwayError`] when the path fails security validation
92+
/// Returns [`AnvilError`] when the path fails security validation
9393
/// (not absolute, world-writable), the spawn itself fails, or the
9494
/// child does not exit within [`ASKPASS_TIMEOUT`].
95-
pub async fn confirm_with(askpass: &OsString, prompt: &str) -> Result<bool, GitwayError> {
95+
pub async fn confirm_with(askpass: &OsString, prompt: &str) -> Result<bool, AnvilError> {
9696
let path = PathBuf::from(askpass);
9797
validate_security(&path)?;
9898

@@ -110,13 +110,13 @@ pub async fn confirm_with(askpass: &OsString, prompt: &str) -> Result<bool, Gitw
110110
let status = match timeout(ASKPASS_TIMEOUT, cmd.status()).await {
111111
Ok(Ok(s)) => s,
112112
Ok(Err(e)) => {
113-
return Err(GitwayError::signing(format!(
113+
return Err(AnvilError::signing(format!(
114114
"askpass spawn failed for {}: {e}",
115115
path.display()
116116
)));
117117
}
118118
Err(_elapsed) => {
119-
return Err(GitwayError::signing(format!(
119+
return Err(AnvilError::signing(format!(
120120
"askpass {} did not respond within {:?}",
121121
path.display(),
122122
ASKPASS_TIMEOUT
@@ -138,15 +138,15 @@ pub async fn confirm_with(askpass: &OsString, prompt: &str) -> Result<bool, Gitw
138138
/// subset of the Unix contract we can still enforce. Windows users
139139
/// wanting stricter checks should place their askpass binary in a
140140
/// directory their account has exclusive write access to.
141-
fn validate_security(askpass: &Path) -> Result<(), GitwayError> {
141+
fn validate_security(askpass: &Path) -> Result<(), AnvilError> {
142142
if !askpass.is_absolute() {
143-
return Err(GitwayError::invalid_config(format!(
143+
return Err(AnvilError::invalid_config(format!(
144144
"SSH_ASKPASS {} must be an absolute path",
145145
askpass.display()
146146
)));
147147
}
148148
let meta = std::fs::metadata(askpass).map_err(|e| {
149-
GitwayError::invalid_config(format!(
149+
AnvilError::invalid_config(format!(
150150
"SSH_ASKPASS {} cannot be stat()ed: {e}",
151151
askpass.display()
152152
))
@@ -158,7 +158,7 @@ fn validate_security(askpass: &Path) -> Result<(), GitwayError> {
158158
// to the user but writable by anyone on the system is an
159159
// exploit waiting to happen.
160160
if meta.permissions().mode() & 0o002 != 0 {
161-
return Err(GitwayError::invalid_config(format!(
161+
return Err(AnvilError::invalid_config(format!(
162162
"SSH_ASKPASS {} is world-writable and cannot be trusted",
163163
askpass.display()
164164
)));

src/agent/client.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
//!
2929
//! let mut agent = Agent::from_env()?;
3030
//! agent.list()?.iter().for_each(|id| println!("{}", id.fingerprint));
31-
//! # Ok::<(), anvil_ssh::GitwayError>(())
31+
//! # Ok::<(), anvil_ssh::AnvilError>(())
3232
//! ```
3333
//!
3434
//! # Errors
3535
//!
36-
//! Every operation returns [`GitwayError`]. Agent-protocol failures and
36+
//! Every operation returns [`AnvilError`]. Agent-protocol failures and
3737
//! I/O failures are both folded into the `Io` variant with a descriptive
38-
//! message; callers that care can match via [`GitwayError::is_io`].
38+
//! message; callers that care can match via [`AnvilError::is_io`].
3939
//!
4040
//! # Zeroization
4141
//!
@@ -56,7 +56,7 @@ use ssh_agent_lib::proto::{
5656
use ssh_key::{Algorithm, HashAlg, PrivateKey, PublicKey, Signature};
5757
use zeroize::Zeroizing;
5858

59-
use crate::GitwayError;
59+
use crate::AnvilError;
6060

6161
// ── Transport abstraction ─────────────────────────────────────────────────────
6262
//
@@ -105,7 +105,7 @@ pub struct Identity {
105105
/// Handle to a running SSH agent.
106106
///
107107
/// Thin wrapper over [`ssh_agent_lib::blocking::Client`] that translates
108-
/// its error type into [`GitwayError`] and the protocol structs into
108+
/// its error type into [`AnvilError`] and the protocol structs into
109109
/// more convenient Gitway types.
110110
#[derive(Debug)]
111111
pub struct Agent {
@@ -117,12 +117,12 @@ impl Agent {
117117
///
118118
/// # Errors
119119
///
120-
/// Returns [`GitwayError::invalid_config`] when `$SSH_AUTH_SOCK` is
121-
/// unset or empty, and [`GitwayError::from`] an I/O error when the
120+
/// Returns [`AnvilError::invalid_config`] when `$SSH_AUTH_SOCK` is
121+
/// unset or empty, and [`AnvilError::from`] an I/O error when the
122122
/// socket cannot be opened.
123-
pub fn from_env() -> Result<Self, GitwayError> {
123+
pub fn from_env() -> Result<Self, AnvilError> {
124124
let sock = env::var("SSH_AUTH_SOCK").map_err(|_e| {
125-
GitwayError::invalid_config("SSH_AUTH_SOCK is not set").with_hint(
125+
AnvilError::invalid_config("SSH_AUTH_SOCK is not set").with_hint(
126126
"No SSH agent is advertised in this shell. Start one with \
127127
`gitway agent start -s` and eval the output, or enable the \
128128
bundled systemd user unit (`systemctl --user enable --now \
@@ -134,7 +134,7 @@ impl Agent {
134134
})?;
135135
if sock.is_empty() {
136136
return Err(
137-
GitwayError::invalid_config("SSH_AUTH_SOCK is empty").with_hint(
137+
AnvilError::invalid_config("SSH_AUTH_SOCK is empty").with_hint(
138138
"Something cleared `SSH_AUTH_SOCK` to the empty string. \
139139
Unset it (`unset SSH_AUTH_SOCK`) and re-export it to a \
140140
real socket path, or just restart the shell.",
@@ -148,9 +148,9 @@ impl Agent {
148148
///
149149
/// # Errors
150150
///
151-
/// Returns [`GitwayError::from`] the underlying I/O error when the
151+
/// Returns [`AnvilError::from`] the underlying I/O error when the
152152
/// socket cannot be opened.
153-
pub fn connect(path: &std::path::Path) -> Result<Self, GitwayError> {
153+
pub fn connect(path: &std::path::Path) -> Result<Self, AnvilError> {
154154
let stream = open_transport(path)?;
155155
Ok(Self {
156156
inner: Client::new(stream),
@@ -161,8 +161,8 @@ impl Agent {
161161
///
162162
/// # Errors
163163
///
164-
/// Returns [`GitwayError`] on agent protocol or I/O failure.
165-
pub fn list(&mut self) -> Result<Vec<Identity>, GitwayError> {
164+
/// Returns [`AnvilError`] on agent protocol or I/O failure.
165+
pub fn list(&mut self) -> Result<Vec<Identity>, AnvilError> {
166166
let raw = self
167167
.inner
168168
.request_identities()
@@ -189,13 +189,13 @@ impl Agent {
189189
///
190190
/// # Errors
191191
///
192-
/// Returns [`GitwayError`] on agent protocol or I/O failure.
192+
/// Returns [`AnvilError`] on agent protocol or I/O failure.
193193
pub fn add(
194194
&mut self,
195195
key: &PrivateKey,
196196
lifetime: Option<Duration>,
197197
confirm: bool,
198-
) -> Result<(), GitwayError> {
198+
) -> Result<(), AnvilError> {
199199
let identity = AddIdentity {
200200
credential: Credential::Key {
201201
privkey: key.key_data().clone(),
@@ -211,7 +211,7 @@ impl Agent {
211211
let mut constraints: Vec<KeyConstraint> = Vec::with_capacity(2);
212212
if let Some(d) = lifetime {
213213
let secs = u32::try_from(d.as_secs())
214-
.map_err(|_e| GitwayError::invalid_config("lifetime exceeds u32 seconds"))?;
214+
.map_err(|_e| AnvilError::invalid_config("lifetime exceeds u32 seconds"))?;
215215
constraints.push(KeyConstraint::Lifetime(secs));
216216
}
217217
if confirm {
@@ -230,9 +230,9 @@ impl Agent {
230230
///
231231
/// # Errors
232232
///
233-
/// Returns [`GitwayError`] when the agent rejects the request (e.g.
233+
/// Returns [`AnvilError`] when the agent rejects the request (e.g.
234234
/// identity not loaded) or on I/O failure.
235-
pub fn remove(&mut self, public_key: &PublicKey) -> Result<(), GitwayError> {
235+
pub fn remove(&mut self, public_key: &PublicKey) -> Result<(), AnvilError> {
236236
self.inner
237237
.remove_identity(RemoveIdentity {
238238
pubkey: public_key.key_data().clone(),
@@ -244,8 +244,8 @@ impl Agent {
244244
///
245245
/// # Errors
246246
///
247-
/// Returns [`GitwayError`] on agent protocol or I/O failure.
248-
pub fn remove_all(&mut self) -> Result<(), GitwayError> {
247+
/// Returns [`AnvilError`] on agent protocol or I/O failure.
248+
pub fn remove_all(&mut self) -> Result<(), AnvilError> {
249249
self.inner
250250
.remove_all_identities()
251251
.map_err(|e| io_err(format!("agent remove-all failed: {e}")))
@@ -258,11 +258,11 @@ impl Agent {
258258
///
259259
/// # Errors
260260
///
261-
/// Returns [`GitwayError`] when the agent rejects the passphrase or
261+
/// Returns [`AnvilError`] when the agent rejects the passphrase or
262262
/// on I/O failure. The passphrase string passed through to
263263
/// `ssh-agent-lib` is a fresh `String` derived from `passphrase`; the
264264
/// caller's [`Zeroizing`] buffer is not moved.
265-
pub fn lock(&mut self, passphrase: &Zeroizing<String>) -> Result<(), GitwayError> {
265+
pub fn lock(&mut self, passphrase: &Zeroizing<String>) -> Result<(), AnvilError> {
266266
self.inner
267267
.lock(passphrase.as_str().to_owned())
268268
.map_err(|e| io_err(format!("agent lock failed: {e}")))
@@ -272,9 +272,9 @@ impl Agent {
272272
///
273273
/// # Errors
274274
///
275-
/// Returns [`GitwayError`] when the agent rejects the passphrase or
275+
/// Returns [`AnvilError`] when the agent rejects the passphrase or
276276
/// on I/O failure.
277-
pub fn unlock(&mut self, passphrase: &Zeroizing<String>) -> Result<(), GitwayError> {
277+
pub fn unlock(&mut self, passphrase: &Zeroizing<String>) -> Result<(), AnvilError> {
278278
self.inner
279279
.unlock(passphrase.as_str().to_owned())
280280
.map_err(|e| io_err(format!("agent unlock failed: {e}")))
@@ -296,10 +296,10 @@ impl Agent {
296296
///
297297
/// # Errors
298298
///
299-
/// Returns [`GitwayError`] when the agent rejects the request
299+
/// Returns [`AnvilError`] when the agent rejects the request
300300
/// (commonly because the key is not loaded, the agent is locked,
301301
/// or a `--confirm` prompt was denied) or on I/O failure.
302-
pub fn sign(&mut self, public_key: &PublicKey, data: &[u8]) -> Result<Signature, GitwayError> {
302+
pub fn sign(&mut self, public_key: &PublicKey, data: &[u8]) -> Result<Signature, AnvilError> {
303303
let flags: u32 = match public_key.algorithm() {
304304
Algorithm::Rsa { .. } => 4, // SSH_AGENT_RSA_SHA2_512
305305
_ => 0,
@@ -316,8 +316,8 @@ impl Agent {
316316

317317
// ── Internal helpers ──────────────────────────────────────────────────────────
318318

319-
/// Convert any display-able error into a `GitwayError` with an
319+
/// Convert any display-able error into a `AnvilError` with an
320320
/// `std::io::Error` source carrying `message`.
321-
fn io_err(message: String) -> GitwayError {
322-
GitwayError::from(std::io::Error::other(message))
321+
fn io_err(message: String) -> AnvilError {
322+
AnvilError::from(std::io::Error::other(message))
323323
}

0 commit comments

Comments
 (0)