pub struct SigningSession<'ctx> { /* private fields */ }Available on (crate features
sign or verify) and crate feature sign only.Expand description
A synchronous Sigstore signing session.
Sessions hold a provided user identity and key materials tied to that identity. A single
session may be used to sign multiple items. For more information, see SigningSession::sign.
This signing session operates synchronously, thus it cannot be used in an asynchronous context.
To construct an asynchronous SigningSession, use SigningContext::signer().
Implementations§
Source§impl<'ctx> SigningSession<'ctx>
impl<'ctx> SigningSession<'ctx>
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the session’s identity token or key material is expired.
If the session is expired, it cannot be used for signing operations, and a new session must be created with a fresh identity token.
Sourcepub fn sign<R: Read>(&self, input: R) -> SigstoreResult<SigningArtifact>
pub fn sign<R: Read>(&self, input: R) -> SigstoreResult<SigningArtifact>
Signs for the input with the session’s identity. If the identity is expired,
SigstoreError::ExpiredSigningSession is returned.
Auto Trait Implementations§
impl<'ctx> !Freeze for SigningSession<'ctx>
impl<'ctx> !RefUnwindSafe for SigningSession<'ctx>
impl<'ctx> Send for SigningSession<'ctx>
impl<'ctx> Sync for SigningSession<'ctx>
impl<'ctx> Unpin for SigningSession<'ctx>
impl<'ctx> !UnwindSafe for SigningSession<'ctx>
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
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more