make the full error set explicit in asn1.DecodeError

This commit is contained in:
Ben Burkert 2025-10-03 11:40:59 -04:00
parent a32d812785
commit 946ed0db9e

View file

@ -183,7 +183,7 @@ pub const Element = struct {
}
};
pub const DecodeError = error{InvalidLength} || std.Io.Reader.Error;
pub const DecodeError = error{ InvalidLength, EndOfStream, ReadFailed };
/// Safely decode a DER/BER/CER element at `index`:
/// - Ensures length uses shortest form