pub struct CertificateRecord {
pub cert_type: u32,
pub cert_encoding: u32,
pub print_name: String,
pub alias: Vec<u8>,
pub subject: Vec<u8>,
pub issuer: Vec<u8>,
pub serial_number: Vec<u8>,
pub subject_key_identifier: Option<Vec<u8>>,
pub public_key_hash: [u8; 20],
}Expand description
The attribute set of a certificate record.
Every field except the two format tags is a copy of bytes from the
certificate itself; see crate::der. The record’s key data is the
certificate DER, stored in the clear — a certificate is public.
Fields§
§cert_type: u32§cert_encoding: u32§print_name: StringPrintName and Alias, which macOS sets to the same label.
alias: Vec<u8>§subject: Vec<u8>§issuer: Vec<u8>§serial_number: Vec<u8>§subject_key_identifier: Option<Vec<u8>>Absent when the certificate carries no such extension.
public_key_hash: [u8; 20]SHA-1 of the public key bits: the value that links this certificate to
its private key, whose Label holds the same 20 bytes.
Implementations§
Source§impl CertificateRecord
impl CertificateRecord
Sourcepub fn for_certificate(label: &str, certificate: &Certificate<'_>) -> Self
pub fn for_certificate(label: &str, certificate: &Certificate<'_>) -> Self
The record macOS writes for an imported certificate.
pub fn to_attributes(&self, relation: &Relation) -> Vec<Option<Value>>
Trait Implementations§
Source§impl Clone for CertificateRecord
impl Clone for CertificateRecord
Source§fn clone(&self) -> CertificateRecord
fn clone(&self) -> CertificateRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CertificateRecord
impl RefUnwindSafe for CertificateRecord
impl Send for CertificateRecord
impl Sync for CertificateRecord
impl Unpin for CertificateRecord
impl UnsafeUnpin for CertificateRecord
impl UnwindSafe for CertificateRecord
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