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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UnsignedCertificate
impl RefUnwindSafe for UnsignedCertificate
impl Send for UnsignedCertificate
impl Sync for UnsignedCertificate
impl Unpin for UnsignedCertificate
impl UnsafeUnpin for UnsignedCertificate
impl UnwindSafe for UnsignedCertificate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more