Skip to content

Commit

Permalink
fix(x509-cert): test updated to read_nested in IMPLICIT
Browse files Browse the repository at this point in the history
  • Loading branch information
dishmaker committed Oct 9, 2024
1 parent d79568b commit f804da1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions x509-cert/tests/pkix_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ fn decode_idp_negative_incomplete() {
let idp =
IssuingDistributionPoint::from_der(&hex!("3067A060A05EA45C305A310B3009060355040613025553311F301D060355040A131654657374204365727469666963617465732032303137311C301A060355040B13136F6E6C79536F6D65526561736F6E7320434133310C300A0603550403130343524C8304079F80"));
let err = idp.err().unwrap();
assert_eq!(err.position().unwrap(), 103u8.into());
assert_eq!(err.position().unwrap(), 105u8.into());
assert_eq!(
ErrorKind::Incomplete {
expected_len: 106u8.into(),
Expand Down Expand Up @@ -1202,7 +1202,13 @@ fn decode_idp_negative_bool_long() {
let idp =
IssuingDistributionPoint::from_der(&hex!("30820168A0820161A082015DA4753073310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353129302706035504031320696E6469726563742043524C20666F7220696E64697265637443524C20434136A4753073310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353129302706035504031320696E6469726563742043524C20666F7220696E64697265637443524C20434137A46D306B310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353121301F0603550403131843524C3120666F7220696E64697265637443524C204341358402FFFF"));
let err = idp.err().unwrap();
assert_eq!(ErrorKind::Length { tag: Tag::Boolean }, err.kind());
assert_eq!(
ErrorKind::Incomplete {
expected_len: Length::new(365),
actual_len: Length::new(364)
},
err.kind()
);
}

#[test]
Expand Down

0 comments on commit f804da1

Please sign in to comment.