pub struct X509(_);
This is supported on crate feature dns-over-openssl only.
Expand description

An X509 public key certificate.

Implementations

Returns a new builder.

Deserializes a PEM-encoded X509 structure.

The input should have a header of -----BEGIN CERTIFICATE-----.

This corresponds to PEM_read_bio_X509.

Deserializes a DER-encoded X509 structure.

This corresponds to d2i_X509.

Deserializes a list of PEM-formatted certificates.

Methods from Deref<Target = X509Ref>

Returns this certificate’s subject name.

This corresponds to X509_get_subject_name.

Returns the hash of the certificates subject

This corresponds to X509_subject_name_hash.

Returns this certificate’s issuer name.

This corresponds to X509_get_issuer_name.

Returns this certificate’s subject alternative name entries, if they exist.

This corresponds to X509_get_ext_d2i called with NID_subject_alt_name.

Returns this certificate’s issuer alternative name entries, if they exist.

This corresponds to X509_get_ext_d2i called with NID_issuer_alt_name.

Returns this certificate’s authority information access entries, if they exist.

This corresponds to X509_get_ext_d2i called with NID_info_access.

Returns a digest of the DER representation of the certificate.

This corresponds to X509_digest.

👎 Deprecated since 0.10.9:

renamed to digest

Returns the certificate’s Not After validity period.

Returns the certificate’s Not Before validity period.

Returns the certificate’s signature

Returns the certificate’s signature algorithm.

Returns the list of OCSP responder URLs specified in the certificate’s Authority Information Access field.

Checks that this certificate issued subject.

Returns certificate version. If this certificate has no explicit version set, it defaults to version 1.

Note that 0 return value stands for version 1, 1 for version 2 and so on.

This corresponds to X509_get_version.

Check if the certificate is signed using the given public key.

Only the signature is checked: no other checks (such as certificate chain validity) are performed.

Returns true if verification succeeds.

This corresponds to [`X509_verify“].

Returns this certificate’s serial number.

This corresponds to X509_get_serialNumber.

Serializes the certificate into a PEM-encoded X509 structure.

The output will have a header of -----BEGIN CERTIFICATE-----.

This corresponds to PEM_write_bio_X509.

Serializes the certificate into a DER-encoded X509 structure.

This corresponds to i2d_X509.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Executes the destructor for this type. Read more

The raw C type.

The type representing a reference to this type.

Constructs an instance of this type from its raw type.

Returns a raw pointer to the wrapped value.

The C stack type for this element. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more