Skip to content

Commit 5a1ed6d

Browse files
authored
feat(ffi): expose inner_key method (#439)
- Expose inner_key() method for SSH private keys in FFI bindings - Update both Rust FFI implementation and .NET generated bindings
1 parent 3e0647f commit 5a1ed6d

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

ffi/dotnet/Devolutions.Picky/Generated/KeyKind.cs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/dotnet/Devolutions.Picky/Generated/RawKeyKind.cs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/dotnet/Devolutions.Picky/Generated/RawSshPrivateKey.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/dotnet/Devolutions.Picky/Generated/SshPrivateKey.cs

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/src/ssh.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ pub mod ffi {
210210
Ok(Box::new(SshPrivateKey(key)))
211211
}
212212

213+
pub fn inner_key(&self) -> Option<Box<PrivateKey>> {
214+
self.0.inner_key().cloned().map(PrivateKey).map(Box::new)
215+
}
216+
213217
/// Exports the SSH Private Key into a PEM object
214218
pub fn to_pem(&self) -> Result<Box<Pem>, Box<PickyError>> {
215219
let pem = self.0.to_pem()?;

0 commit comments

Comments
 (0)