struct

Matter::Crypto::MatterCertificate

Inherits TLV::Serializable < Struct < Value < Object

Matter Certificate TLV structure See Matter spec section 6.5.2 "Matter Certificate Encoding"

Constructors

new(serial_number : Bytes, signature_algorithm : UInt8, issuer : DNAttributes, not_before : UInt32, not_after : UInt32, subject : DNAttributes, public_key_algorithm : UInt8, elliptic_curve_id : UInt8, ec_public_key : Bytes, signature : Bytes, extensions : TLV::Any | Nil = nil)
Source
new(any : TLV::Any)
Source

Class methods

from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian)
Source
from_slice(bytes : Bytes)
Source
from_tlv(any : TLV::Any)
Source
from_tlv(data : Bytes)
Source

Instance methods

ec_public_key

Tag 9: EC public key (octet string, 65 bytes for uncompressed P-256)

Source
ec_public_key=(ec_public_key : Bytes)

Tag 9: EC public key (octet string, 65 bytes for uncompressed P-256)

Source
elliptic_curve_id

Tag 8: Elliptic curve ID (unsigned int) 1 = prime256v1 (P-256)

Source
elliptic_curve_id=(elliptic_curve_id : UInt8)

Tag 8: Elliptic curve ID (unsigned int) 1 = prime256v1 (P-256)

Source
extensions

Tag 10: Extensions (list)

Source
extensions=(extensions : TLV::Any | Nil)

Tag 10: Extensions (list)

Source
fabric_id

Extract fabric ID from subject DN

Source
icac?

Check if this is an ICAC (has icac_id)

Source
issuer

Tag 3: Issuer DN (list of DN attributes)

Source
issuer=(issuer : DNAttributes)

Tag 3: Issuer DN (list of DN attributes)

Source
noc?

Check if this is a NOC (has both fabric_id and node_id)

Source
node_id

Extract node ID from subject DN

Source
not_after

Tag 5: Not After (unsigned int, Matter epoch seconds)

Source
not_after=(not_after : UInt32)

Tag 5: Not After (unsigned int, Matter epoch seconds)

Source
not_before

Tag 4: Not Before (unsigned int, Matter epoch seconds)

Source
not_before=(not_before : UInt32)

Tag 4: Not Before (unsigned int, Matter epoch seconds)

Source
public_key_algorithm

Tag 7: Public key algorithm (unsigned int) 1 = EC public key

Source
public_key_algorithm=(public_key_algorithm : UInt8)

Tag 7: Public key algorithm (unsigned int) 1 = EC public key

Source
root_ca?

Check if this is a root CA (has rcac_id)

Source
serial_number

Tag 1: Serial number (octet string, 1-20 bytes)

Source
serial_number=(serial_number : Bytes)

Tag 1: Serial number (octet string, 1-20 bytes)

Source
signature

Tag 11: Signature (octet string, 64 bytes for P-256 ECDSA)

Source
signature=(signature : Bytes)

Tag 11: Signature (octet string, 64 bytes for P-256 ECDSA)

Source
signature_algorithm

Tag 2: Signature algorithm (unsigned int) 1 = ECDSA with SHA256

Source
signature_algorithm=(signature_algorithm : UInt8)

Tag 2: Signature algorithm (unsigned int) 1 = ECDSA with SHA256

Source
subject

Tag 6: Subject DN (list of DN attributes)

Source
subject=(subject : DNAttributes)

Tag 6: Subject DN (list of DN attributes)

Source
to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil
Source
to_slice
Source
to_tlv(outer_tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : TLV::Any
Source