Struct CodeSignature

Source
pub struct CodeSignature { /* private fields */ }
Expand description

These fields contain information about binary code signatures.

Implementations§

Source§

impl CodeSignature

Source

pub fn get_exists(&self) -> Option<&bool>

Boolean to capture if a signature is present.

Source

pub fn set_exists(&mut self, exists_arg: bool)

Boolean to capture if a signature is present.

§Example

true

Source

pub fn get_subject_name(&self) -> Option<&String>

Subject name of the code signer

Source

pub fn set_subject_name(&mut self, subject_name_arg: String)

Subject name of the code signer

§Example

Microsoft Corporation

Source

pub fn get_valid(&self) -> Option<&bool>

Boolean to capture if the digital signature is verified against the binary content.

Leave unpopulated if a certificate was unchecked.

Source

pub fn set_valid(&mut self, valid_arg: bool)

Boolean to capture if the digital signature is verified against the binary content.

Leave unpopulated if a certificate was unchecked.

§Example

true

Source

pub fn get_trusted(&self) -> Option<&bool>

Stores the trust status of the certificate chain.

Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.

Source

pub fn set_trusted(&mut self, trusted_arg: bool)

Stores the trust status of the certificate chain.

Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.

§Example

true

Source

pub fn get_status(&self) -> Option<&String>

Additional information about the certificate status.

This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.

Source

pub fn set_status(&mut self, status_arg: String)

Additional information about the certificate status.

This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.

§Example

ERROR_UNTRUSTED_ROOT

Source

pub fn get_team_id(&self) -> Option<&String>

The team identifier used to sign the process.

This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.

Source

pub fn set_team_id(&mut self, team_id_arg: String)

The team identifier used to sign the process.

This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.

§Example

EQHXZ8M8AV

Source

pub fn get_signing_id(&self) -> Option<&String>

The identifier used to sign the process.

This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.

Source

pub fn set_signing_id(&mut self, signing_id_arg: String)

The identifier used to sign the process.

This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.

§Example

com.apple.xpc.proxy

Source

pub fn get_digest_algorithm(&self) -> Option<&String>

The hashing algorithm used to sign the process.

This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.

Source

pub fn set_digest_algorithm(&mut self, digest_algorithm_arg: String)

The hashing algorithm used to sign the process.

This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.

§Example

sha256

Source

pub fn get_timestamp(&self) -> Option<&Timestamp>

Date and time when the code signature was generated and signed.

Source

pub fn set_timestamp(&mut self, timestamp_arg: Timestamp)

Date and time when the code signature was generated and signed.

§Example

2021-01-01T12:10:30Z

Trait Implementations§

Source§

impl Clone for CodeSignature

Source§

fn clone(&self) -> CodeSignature

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for CodeSignature

Source§

fn default() -> CodeSignature

Returns the “default value” for a type. Read more
Source§

impl Serialize for CodeSignature

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.