Cert: Support path-len-constraint in BasicConstraints

This commit is contained in:
Kedar Sovani 2023-01-21 19:50:07 +05:30
parent 98e0b6cef8
commit 2d65570234

View file

@ -180,10 +180,10 @@ impl BasicConstraints {
w.start_seq("")?; w.start_seq("")?;
if self.is_ca { if self.is_ca {
// Encode CA only if true // Encode CA only if true
w.bool("CA:", true)? w.bool("CA:", true)?;
} }
if self.path.is_some() { if let Some(len) = self.path {
error!("Path Len is not yet implemented"); w.integer("Path Len Constraint", &[len])?;
} }
w.end_seq() w.end_seq()
} }