pub fn validate_der(raw: &[u8]) -> Result<(), ShapeViolation>Expand description
Validate that raw is a single well-formed DER value per X.690 §§ 8 /
10 / 11 (not merely valid BER — long-form lengths below the short-form
threshold and indefinite lengths are rejected).
§Errors
- [
INVALID_DER_VIOLATION] (validDer) — malformed or non-canonical DER, or trailing bytes after the top-level value. - [
DEPTH_BOUND_VIOLATION] (depthBound) — nesting exceeds theMAX_ASN1_DEPTHnative-stack-safety bound.