pub struct GpgAgentSockets { /* private fields */ }Expand description
Validated GnuPG home and socket paths, discovered without starting an agent.
Only the native socket is granted by the GPG integration. Other sockets are tracked for isolation; SSH authentication requires its separate capability.
Implementations§
Source§impl GpgAgentSockets
impl GpgAgentSockets
Sourcepub fn new(
home: impl Into<PathBuf>,
agent: impl Into<PathBuf>,
) -> Result<Self, ProcessRunnerError>
pub fn new( home: impl Into<PathBuf>, agent: impl Into<PathBuf>, ) -> Result<Self, ProcessRunnerError>
Validates explicit GnuPG home and native-agent paths without performing IO.
Sourcepub fn with_auxiliary_sockets(
self,
sockets: impl IntoIterator<Item = PathBuf>,
) -> Result<Self, ProcessRunnerError>
pub fn with_auxiliary_sockets( self, sockets: impl IntoIterator<Item = PathBuf>, ) -> Result<Self, ProcessRunnerError>
Adds SSH, extra, or browser sockets that must not be implicitly exposed.
Sourcepub fn home(&self) -> &Path
pub fn home(&self) -> &Path
Returns the home used by GnuPG clients to locate their configuration.
Sourcepub fn agent(&self) -> &Path
pub fn agent(&self) -> &Path
Returns the native GPG agent endpoint, not the SSH protocol endpoint.
Sourcepub fn public_keyrings(&self) -> impl Iterator<Item = PathBuf> + '_
pub fn public_keyrings(&self) -> impl Iterator<Item = PathBuf> + '_
Returns the conventional public-key stores imported read-only by GPG integration.
Private keys, host trust state, configuration, and backup files are not included.
Sourcepub fn validate_public_key_access(&self) -> Result<(), ProcessRunnerError>
pub fn validate_public_key_access(&self) -> Result<(), ProcessRunnerError>
Rejects keyboxd-backed storage rather than exposing its writable host IPC interface or presenting an empty or stale file-based keyring as the user’s public keys.
Sourcepub fn paths(&self) -> impl Iterator<Item = &Path>
pub fn paths(&self) -> impl Iterator<Item = &Path>
Enumerates native and auxiliary endpoints for sandbox exclusion.
Sourcepub async fn discover(
home: &Path,
overrides: &[(OsString, OsString)],
) -> Result<Option<Self>, ProcessRunnerError>
pub async fn discover( home: &Path, overrides: &[(OsString, OsString)], ) -> Result<Option<Self>, ProcessRunnerError>
Runs gpgconf --list-dirs with bounded output and a two-second timeout.
Returns None if gpgconf is not installed. Does not read keys or start an
agent; gpgconf may initialize its runtime socket directory. Invalid output
and discovery failures are errors.
Trait Implementations§
Source§impl Clone for GpgAgentSockets
impl Clone for GpgAgentSockets
Source§impl Debug for GpgAgentSockets
impl Debug for GpgAgentSockets
impl Eq for GpgAgentSockets
Source§impl PartialEq for GpgAgentSockets
impl PartialEq for GpgAgentSockets
impl StructuralPartialEq for GpgAgentSockets
Auto Trait Implementations§
impl Forget for GpgAgentSockets
impl Freeze for GpgAgentSockets
impl Move for GpgAgentSockets
impl RefUnwindSafe for GpgAgentSockets
impl Send for GpgAgentSockets
impl Sync for GpgAgentSockets
impl Unpin for GpgAgentSockets
impl UnsafeUnpin for GpgAgentSockets
impl UnwindSafe for GpgAgentSockets
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.