From 2d655702348361bfa36901fa78a6d80339e16117 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Sat, 21 Jan 2023 19:50:07 +0530 Subject: [PATCH] Cert: Support path-len-constraint in BasicConstraints --- matter/src/cert/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matter/src/cert/mod.rs b/matter/src/cert/mod.rs index 879981e..74eb93e 100644 --- a/matter/src/cert/mod.rs +++ b/matter/src/cert/mod.rs @@ -180,10 +180,10 @@ impl BasicConstraints { w.start_seq("")?; if self.is_ca { // Encode CA only if true - w.bool("CA:", true)? + w.bool("CA:", true)?; } - if self.path.is_some() { - error!("Path Len is not yet implemented"); + if let Some(len) = self.path { + w.integer("Path Len Constraint", &[len])?; } w.end_seq() }