pub struct ScCertificateMetadata { /* private fields */ }sc-tls only.Expand description
Bounded display metadata. Parsing is informational, never verification.
Names and OIDs are ASCII escaped, at most 1024 bytes per field. Of the extensions, only the Subject Alternative Names are read. Dates are signed Unix seconds, not a current-validity or revocation verdict. No certificate text is in Debug.
Parsing doesn’t verify, but parsing a verified certificate, such as the leaf a server policy context returns, reads what its CA signed.
Implementations§
Source§impl ScCertificateMetadata
impl ScCertificateMetadata
Sourcepub fn subject(&self) -> &str
pub fn subject(&self) -> &str
Escaped subject distinguished name; not an SC identity principal.
Sourcepub fn issuer(&self) -> &str
pub fn issuer(&self) -> &str
Escaped issuer distinguished name; not proof of issuer authorization.
Sourcepub fn subject_alt_names(&self) -> &[ScSubjectAltName]
pub fn subject_alt_names(&self) -> &[ScSubjectAltName]
The DNS, URI, email and IP Subject Alternative Names, unescaped and
in certificate order (#1965). Other name forms are left out, and a
missing, repeated or malformed extension gives none, so a rule should
allow on a name it finds rather than deny on one it misses. Match by
exact equality; see ScSubjectAltName for what that means.
Sourcepub fn not_before_unix(&self) -> i64
pub fn not_before_unix(&self) -> i64
Certificate not-before, in Unix seconds.
Sourcepub fn not_after_unix(&self) -> i64
pub fn not_after_unix(&self) -> i64
Certificate not-after, in Unix seconds.
Sourcepub fn public_key_algorithm_oid(&self) -> &str
pub fn public_key_algorithm_oid(&self) -> &str
Subject public-key algorithm OID (not the signature algorithm).
Sourcepub fn signature_algorithm_oid(&self) -> &str
pub fn signature_algorithm_oid(&self) -> &str
Certificate signature algorithm OID.
Sourcepub fn text_truncated(&self) -> bool
pub fn text_truncated(&self) -> bool
At least one display field exceeded its 1024-byte bound.
Trait Implementations§
Source§impl Clone for ScCertificateMetadata
impl Clone for ScCertificateMetadata
Source§fn clone(&self) -> ScCertificateMetadata
fn clone(&self) -> ScCertificateMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more