Fuzzing, property tests, CLI split, and 1.1.0 #2

Merged
lucasrguerra merged 4 commits from feat/robustez into main 2026-11-03 14:38:10 +00:00
Showing only changes of commit 0d4fe01baf - Show all commits
+5
View File
@@ -200,6 +200,11 @@ fn read_der_len(data: &[u8], offset: usize) -> Result<(usize, usize), String> {
}
fn parse_asn1_time_string(s: &str, is_utc: bool) -> Result<DateTime<Utc>, String> {
// The fields below are sliced by byte offset; a multi-byte character from a
// hostile certificate would put a slice boundary inside it and panic.
if !s.is_ascii() {
return Err(format!("ASN.1 time is not ASCII: '{s}'"));
}
let clean = s.trim_end_matches('Z');
if is_utc {
// YYMMDDHHMMSS