struct
Matter::Crypto::MatterCertificate
- Matter::Crypto::MatterCertificate
- Struct
- Value
- Object
Overview
Matter Certificate TLV structure See Matter spec section 6.5.2 "Matter Certificate Encoding"
Included Modules
- TLV::Serializable
Defined in:
matter/crypto/certificate.crConstructors
- .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)
- .new(any : TLV::Any)
Class Method Summary
- .from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian)
- .from_slice(bytes : Bytes)
- .from_tlv(any : TLV::Any)
Instance Method Summary
-
#ec_public_key : Bytes
Tag 9: EC public key (octet string, 65 bytes for uncompressed P-256)
-
#ec_public_key=(ec_public_key : Bytes)
Tag 9: EC public key (octet string, 65 bytes for uncompressed P-256)
-
#elliptic_curve_id : UInt8
Tag 8: Elliptic curve ID (unsigned int) 1 = prime256v1 (P-256)
-
#elliptic_curve_id=(elliptic_curve_id : UInt8)
Tag 8: Elliptic curve ID (unsigned int) 1 = prime256v1 (P-256)
-
#extensions : TLV::Any | Nil
Tag 10: Extensions (list)
-
#extensions=(extensions : TLV::Any | Nil)
Tag 10: Extensions (list)
-
#fabric_id : UInt64 | Nil
Extract fabric ID from subject DN
-
#icac? : Bool
Check if this is an ICAC (has icac_id)
-
#issuer : DNAttributes
Tag 3: Issuer DN (list of DN attributes)
-
#issuer=(issuer : DNAttributes)
Tag 3: Issuer DN (list of DN attributes)
-
#noc? : Bool
Check if this is a NOC (has both fabric_id and node_id)
-
#node_id : UInt64 | Nil
Extract node ID from subject DN
-
#not_after : UInt32
Tag 5: Not After (unsigned int, Matter epoch seconds)
-
#not_after=(not_after : UInt32)
Tag 5: Not After (unsigned int, Matter epoch seconds)
-
#not_before : UInt32
Tag 4: Not Before (unsigned int, Matter epoch seconds)
-
#not_before=(not_before : UInt32)
Tag 4: Not Before (unsigned int, Matter epoch seconds)
-
#public_key_algorithm : UInt8
Tag 7: Public key algorithm (unsigned int) 1 = EC public key
-
#public_key_algorithm=(public_key_algorithm : UInt8)
Tag 7: Public key algorithm (unsigned int) 1 = EC public key
-
#root_ca? : Bool
Check if this is a root CA (has rcac_id)
-
#serial_number : Bytes
Tag 1: Serial number (octet string, 1-20 bytes)
-
#serial_number=(serial_number : Bytes)
Tag 1: Serial number (octet string, 1-20 bytes)
-
#signature : Bytes
Tag 11: Signature (octet string, 64 bytes for P-256 ECDSA)
-
#signature=(signature : Bytes)
Tag 11: Signature (octet string, 64 bytes for P-256 ECDSA)
-
#signature_algorithm : UInt8
Tag 2: Signature algorithm (unsigned int) 1 = ECDSA with SHA256
-
#signature_algorithm=(signature_algorithm : UInt8)
Tag 2: Signature algorithm (unsigned int) 1 = ECDSA with SHA256
-
#subject : DNAttributes
Tag 6: Subject DN (list of DN attributes)
-
#subject=(subject : DNAttributes)
Tag 6: Subject DN (list of DN attributes)
- #to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil
- #to_slice : Bytes
- #to_tlv(outer_tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : TLV::Any
Constructor Detail
Class Method Detail
Instance Method Detail
Tag 9: EC public key (octet string, 65 bytes for uncompressed P-256)
Tag 8: Elliptic curve ID (unsigned int) 1 = prime256v1 (P-256)
Tag 7: Public key algorithm (unsigned int) 1 = EC public key
Tag 2: Signature algorithm (unsigned int) 1 = ECDSA with SHA256