pub struct WalletContents {
pub ca_certificates: Vec<Vec<u8>>,
pub client_cert_chain: Vec<Vec<u8>>,
pub client_private_key: Option<Vec<u8>>,
}Expand description
Parsed contents of an Oracle wallet, as DER bytes ready for rustls.
Fields§
§ca_certificates: Vec<Vec<u8>>Trust-anchor / CA certificates used to verify the server (DER).
client_cert_chain: Vec<Vec<u8>>Client certificate chain for mTLS, leaf first (DER). Empty if the wallet is verify-only.
client_private_key: Option<Vec<u8>>Client private key for mTLS (DER, PKCS#8 or PKCS#1/SEC1). None if the
wallet is verify-only.
Implementations§
Source§impl WalletContents
impl WalletContents
Sourcepub fn has_client_identity(&self) -> bool
pub fn has_client_identity(&self) -> bool
Returns true if a client identity (cert chain + key) is present, i.e.
the wallet can be used for mutual TLS.
Sourcepub fn certificate_metadata(&self) -> Vec<CertMetadata>
pub fn certificate_metadata(&self) -> Vec<CertMetadata>
Parse the X.509 validity window (CertMetadata) of every certificate
this wallet holds — the trust anchors (Self::ca_certificates) first,
then the client identity chain (Self::client_cert_chain), in that
order.
Purely offline: it inspects the DER bytes already parsed into this struct, so no connection or network I/O is involved. A non-certificate or otherwise unparseable DER entry is silently skipped (it never fails the whole call), so one odd entry does not hide the metadata of the rest. This lets a doctor warn on a near-expiry trust anchor or client certificate.
Trait Implementations§
Source§impl Clone for WalletContents
impl Clone for WalletContents
Source§fn clone(&self) -> WalletContents
fn clone(&self) -> WalletContents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more