pub struct X509 { /* private fields */ }
Expand description

This is a wrapper around the OpenSSL X509 cert

Implementations

Creates a self-signed X509v3 certificate and public/private key from the supplied creation args. The certificate identifies an instance of the application running on a host as well as the public key. The PKey holds the corresponding public/private key. Note that if the pkey is stored by cert store, then only the private key will be written. The public key is only ever stored with the cert.

See Part 6 Table 23 for full set of requirements

In particular, application instance cert requires subjectAltName to specify alternate hostnames / ip addresses that the host runs on.

Returns a ByteString representation of the cert which is DER encoded form of X509v3

Returns the key length in bits (if possible)

Gets the common name out of the cert

Tests if the certificate is valid for the supplied time using the not before and not after values on the cert.

Tests if the supplied hostname matches any of the dns alt subject name entries on the cert

Tests if the supplied application uri matches the uri alt subject name entry on the cert

OPC UA Part 6 MessageChunk structure

The thumbprint is the SHA1 digest of the DER form of the certificate. The hash is 160 bits (20 bytes) in length and is sent in some secure conversation headers.

The thumbprint might be used by the server / client for look-up purposes.

Turn the Asn1 values into useful portable types

Turn the Asn1 values into useful portable types

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

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.

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.