pub struct UnsignedCertificate { /* private fields */ }Expand description
A certificate whose fields are set but whose signature has not yet
been computed. Convert to a signed MatterCertificate via
Self::assemble once an external signer produces the 64-byte raw
ECDSA signature over Self::tbs_der.
Implementations§
Source§impl UnsignedCertificate
impl UnsignedCertificate
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
The certificate’s extensions, as set on the builder.
Sourcepub fn subject(&self) -> &DistinguishedName
pub fn subject(&self) -> &DistinguishedName
The certificate’s subject distinguished name, as set on the builder.
Sourcepub fn issuer(&self) -> &DistinguishedName
pub fn issuer(&self) -> &DistinguishedName
The certificate’s issuer distinguished name, as set on the builder.
Sourcepub fn tbs_der(&self) -> Result<Vec<u8>>
pub fn tbs_der(&self) -> Result<Vec<u8>>
Return the X.509 TBSCertificate DER bytes that an external signer
must sign. Byte-identical to matter.js’s Certificate.asUnsignedDer().
§Errors
Returns any Error crate::MatterCertificate::to_x509_tbs_der would
return on conversion failure (DN attribute with no defined X.509 OID
mapping, etc.).
Sourcepub fn assemble(self, signature: [u8; 64]) -> MatterCertificate
pub fn assemble(self, signature: [u8; 64]) -> MatterCertificate
Combine the unsigned fields with a 64-byte raw ECDSA signature
(the bytes the signer produced for self.tbs_der()).
Infallible: all fields were validated at build_unsigned().
Trait Implementations§
Source§impl Clone for UnsignedCertificate
impl Clone for UnsignedCertificate
Source§fn clone(&self) -> UnsignedCertificate
fn clone(&self) -> UnsignedCertificate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more