pub struct SignerInfo {
pub sid: SignerIdentifier,
pub signed_attrs: Option<Attributes>,
pub unsigned_attrs: Option<Attributes>,
pub signature: Vec<u8>,
pub digest_alg: Algorithm,
}
Expand description
Parse SignerInfo.
This includes the signer information of a PE signature.
Fields§
§sid: SignerIdentifier
Signer Identifier
This ID refers to a certificate in the SignedData::cert_list
.
signed_attrs: Option<Attributes>
Authenticated Attributes.
It can be verified using a signature and SignerInfo::sid
’s corresponding certificate chain.
unsigned_attrs: Option<Attributes>
Unauthenticated Attributes.
signature: Vec<u8>
SignerInfo::signed_attrs
’s signature.
digest_alg: Algorithm
Sigature Algorithm
Implementations§
Source§impl SignerInfo
impl SignerInfo
Sourcepub fn verify(
&self,
cert_list: &[Certificate],
indata: &[u8],
option: &VerifyOption,
) -> Result<PeSignStatus, PeSignError>
pub fn verify( &self, cert_list: &[Certificate], indata: &[u8], option: &VerifyOption, ) -> Result<PeSignStatus, PeSignError>
Verifying the integrity of the indata
using the SignerInfo
.
cert_list
is a list of certificates with sid and its parent certificates.
Sourcepub fn get_countersignature(&self) -> Result<Option<Self>, PeSignError>
pub fn get_countersignature(&self) -> Result<Option<Self>, PeSignError>
Get countersignature.
Sourcepub fn get_ms_tst_signature(&self) -> Result<Option<SignedData>, PeSignError>
pub fn get_ms_tst_signature(&self) -> Result<Option<SignedData>, PeSignError>
Get microsoft TSTInfo signature.
Sourcepub fn get_nested_signature(&self) -> Result<Option<PeSign>, PeSignError>
pub fn get_nested_signature(&self) -> Result<Option<PeSign>, PeSignError>
Get nested signature in a SignedData
.
Sourcepub fn get_countersigner_info(&self) -> Result<Option<Self>, PeSignError>
pub fn get_countersigner_info(&self) -> Result<Option<Self>, PeSignError>
Get countersigner infomation.
Trait Implementations§
Source§impl Clone for SignerInfo
impl Clone for SignerInfo
Source§fn clone(&self) -> SignerInfo
fn clone(&self) -> SignerInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SignerInfo
impl Debug for SignerInfo
Source§impl Display for SignerInfo
impl Display for SignerInfo
Source§impl PartialEq for SignerInfo
impl PartialEq for SignerInfo
Source§impl TryFrom<SignerInfo> for SignerInfo
impl TryFrom<SignerInfo> for SignerInfo
Source§type Error = PeSignError
type Error = PeSignError
The type returned in the event of a conversion error.
impl Eq for SignerInfo
impl StructuralPartialEq for SignerInfo
Auto Trait Implementations§
impl Freeze for SignerInfo
impl RefUnwindSafe for SignerInfo
impl Send for SignerInfo
impl Sync for SignerInfo
impl Unpin for SignerInfo
impl UnwindSafe for SignerInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.