pub struct Trust { /* private fields */ }Expand description
Wraps SecTrustRef.
Implementations§
Source§impl Trust
impl Trust
Sourcepub fn new(certificate: &Certificate, policies: &[Policy]) -> Result<Self>
pub fn new(certificate: &Certificate, policies: &[Policy]) -> Result<Self>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn from_certificates(
certificates: &[Certificate],
policies: &[Policy],
) -> Result<Self>
pub fn from_certificates( certificates: &[Certificate], policies: &[Policy], ) -> Result<Self>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_policies(&mut self, policies: &[Policy]) -> Result<()>
pub fn set_policies(&mut self, policies: &[Policy]) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_anchor_certificates(
&mut self,
certificates: &[Certificate],
) -> Result<()>
pub fn set_anchor_certificates( &mut self, certificates: &[Certificate], ) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn custom_anchor_certificates(&self) -> Result<Value>
pub fn custom_anchor_certificates(&self) -> Result<Value>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_anchor_certificates_only(
&mut self,
only_anchor_certificates: bool,
) -> Result<()>
pub fn set_anchor_certificates_only( &mut self, only_anchor_certificates: bool, ) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_network_fetch_allowed(&mut self, allowed: bool) -> Result<()>
pub fn set_network_fetch_allowed(&mut self, allowed: bool) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn network_fetch_allowed(&self) -> Result<bool>
pub fn network_fetch_allowed(&self) -> Result<bool>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_verify_date(&mut self, verify_date: SystemTime) -> Result<()>
pub fn set_verify_date(&mut self, verify_date: SystemTime) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn verify_time(&self) -> Result<Option<SystemTime>>
pub fn verify_time(&self) -> Result<Option<SystemTime>>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn evaluate_async(&self) -> Result<()>
pub fn evaluate_async(&self) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn trust_result_type(&self) -> Result<TrustResultType>
pub fn trust_result_type(&self) -> Result<TrustResultType>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn certificate_count(&self) -> usize
pub fn certificate_count(&self) -> usize
Wraps the corresponding SecTrustRef operation.
Sourcepub fn certificate_chain(&self) -> Result<Vec<Certificate>>
pub fn certificate_chain(&self) -> Result<Vec<Certificate>>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn exceptions(&self) -> Result<Option<Vec<u8>>>
pub fn exceptions(&self) -> Result<Option<Vec<u8>>>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_exceptions(&mut self, exceptions: Option<&[u8]>) -> Result<bool>
pub fn set_exceptions(&mut self, exceptions: Option<&[u8]>) -> Result<bool>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_ocsp_responses(&mut self, responses: &[Vec<u8>]) -> Result<()>
pub fn set_ocsp_responses(&mut self, responses: &[Vec<u8>]) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_signed_certificate_timestamps(
&mut self,
timestamps: &[Vec<u8>],
) -> Result<()>
pub fn set_signed_certificate_timestamps( &mut self, timestamps: &[Vec<u8>], ) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn set_options(&mut self, options: TrustOptions) -> Result<()>
pub fn set_options(&mut self, options: TrustOptions) -> Result<()>
Wraps the corresponding SecTrustRef operation.
Sourcepub fn system_anchor_certificates() -> Result<Value>
pub fn system_anchor_certificates() -> Result<Value>
Wraps the corresponding SecTrustRef operation.