Struct c509::C509Json

source ·
pub(crate) struct C509Json {
    pub(crate) self_signed: bool,
    pub(crate) certificate_type: Option<u8>,
    pub(crate) serial_number: Option<UnwrappedBigUint>,
    pub(crate) issuer: Option<RelativeDistinguishedName>,
    pub(crate) validity_not_before: Option<String>,
    pub(crate) validity_not_after: Option<String>,
    pub(crate) subject: RelativeDistinguishedName,
    pub(crate) subject_public_key_algorithm: Option<SubjectPubKeyAlgorithm>,
    pub(crate) subject_public_key: String,
    pub(crate) extensions: Extensions,
    pub(crate) issuer_signature_algorithm: Option<IssuerSignatureAlgorithm>,
    pub(crate) issuer_signature_value: Option<Vec<u8>>,
}
Expand description

A struct representing the JSON format of C509 certificate.

Fields§

§self_signed: bool

Indicate whether the certificate is self-signed.

§certificate_type: Option<u8>

Optional certificate type, if not provided, set to 0 as self-signed.

§serial_number: Option<UnwrappedBigUint>

Optional serial number of the certificate, if not provided, a random number will be generated.

§issuer: Option<RelativeDistinguishedName>

Optional issuer of the certificate, if not provided, issuer is the same as subject.

§validity_not_before: Option<String>

Optional validity not before date, if not provided, set to current time.

§validity_not_after: Option<String>

Optional validity not after date, if not provided, set to no expire date 9999-12-31T23:59:59+00:00.

§subject: RelativeDistinguishedName

Relative distinguished name of the subject.

§subject_public_key_algorithm: Option<SubjectPubKeyAlgorithm>

Optional subject public key algorithm of the certificate, if not provided, set to Ed25519.

§subject_public_key: String

A path to the public key file. Currently support only PEM format.

§extensions: Extensions

Extensions of the certificate.

§issuer_signature_algorithm: Option<IssuerSignatureAlgorithm>

Optional issuer signature algorithm of the certificate, if not provided, set to Ed25519.

§issuer_signature_value: Option<Vec<u8>>

Optional issuer signature value of the certificate.

Trait Implementations§

source§

impl<'de> Deserialize<'de> for C509Json

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for C509Json

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> 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> Same for T

source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,