[−]Struct trust_dns_openssl::tls_server::X509
An X509
public key certificate.
Methods
impl X509
[src]
pub fn builder() -> Result<X509Builder, ErrorStack>
[src]
Returns a new builder.
pub fn from_pem(pem: &[u8]) -> Result<X509, ErrorStack>
[src]
Deserializes a PEM-encoded X509 structure.
The input should have a header of -----BEGIN CERTIFICATE-----
.
This corresponds to PEM_read_bio_X509
.
pub fn from_der(der: &[u8]) -> Result<X509, ErrorStack>
[src]
Deserializes a DER-encoded X509 structure.
This corresponds to d2i_X509
.
pub fn stack_from_pem(pem: &[u8]) -> Result<Vec<X509>, ErrorStack>
[src]
Deserializes a list of PEM-formatted certificates.
Methods from Deref<Target = X509Ref>
pub fn subject_name(&self) -> &X509NameRef
[src]
Returns this certificate's subject name.
This corresponds to X509_get_subject_name
.
pub fn issuer_name(&self) -> &X509NameRef
[src]
Returns this certificate's issuer name.
This corresponds to X509_get_issuer_name
.
pub fn subject_alt_names(&self) -> Option<Stack<GeneralName>>
[src]
Returns this certificate's subject alternative name entries, if they exist.
This corresponds to X509_get_ext_d2i
called with NID_subject_alt_name
.
pub fn issuer_alt_names(&self) -> Option<Stack<GeneralName>>
[src]
Returns this certificate's issuer alternative name entries, if they exist.
This corresponds to X509_get_ext_d2i
called with NID_issuer_alt_name
.
pub fn public_key(&self) -> Result<PKey<Public>, ErrorStack>
[src]
pub fn digest(
&self,
hash_type: MessageDigest
) -> Result<DigestBytes, ErrorStack>
[src]
&self,
hash_type: MessageDigest
) -> Result<DigestBytes, ErrorStack>
Returns a digest of the DER representation of the certificate.
This corresponds to X509_digest
.
pub fn fingerprint(
&self,
hash_type: MessageDigest
) -> Result<Vec<u8>, ErrorStack>
[src]
&self,
hash_type: MessageDigest
) -> Result<Vec<u8>, ErrorStack>
renamed to digest
pub fn not_after(&self) -> &Asn1TimeRef
[src]
Returns the certificate's Not After validity period.
pub fn not_before(&self) -> &Asn1TimeRef
[src]
Returns the certificate's Not Before validity period.
pub fn signature(&self) -> &Asn1BitStringRef
[src]
Returns the certificate's signature
pub fn signature_algorithm(&self) -> &X509AlgorithmRef
[src]
Returns the certificate's signature algorithm.
pub fn ocsp_responders(&self) -> Result<Stack<OpensslString>, ErrorStack>
[src]
Returns the list of OCSP responder URLs specified in the certificate's Authority Information Access field.
pub fn issued(&self, subject: &X509Ref) -> X509VerifyResult
[src]
Checks that this certificate issued subject
.
pub fn verify<T>(&self, key: &PKeyRef<T>) -> Result<bool, ErrorStack> where
T: HasPublic,
[src]
T: HasPublic,
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"].
pub fn serial_number(&self) -> &Asn1IntegerRef
[src]
Returns this certificate's serial number.
This corresponds to X509_get_serialNumber
.
pub fn to_pem(&self) -> Result<Vec<u8>, ErrorStack>
[src]
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
.
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes the certificate into a DER-encoded X509 structure.
This corresponds to i2d_X509
.
Trait Implementations
impl Borrow<X509Ref> for X509
impl AsRef<X509Ref> for X509
impl ForeignType for X509
type CType = X509
The raw C type.
type Ref = X509Ref
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut X509) -> X509
fn as_ptr(&self) -> *mut X509
impl Send for X509
[src]
impl Stackable for X509
[src]
type StackType = stack_st_X509
The C stack type for this element. Read more
impl Drop for X509
fn drop(&mut self)
impl Sync for X509
[src]
impl DerefMut for X509
impl Deref for X509
impl Clone for X509
[src]
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,