Skip to content

Commit a442ead

Browse files
committed
fix(x509-cert): test updated to read_nested in IMPLICIT
1 parent 6d97efa commit a442ead

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

x509-cert/tests/pkix_extensions.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ fn decode_idp_negative_incomplete() {
11701170
let idp =
11711171
IssuingDistributionPoint::from_der(&hex!("3067A060A05EA45C305A310B3009060355040613025553311F301D060355040A131654657374204365727469666963617465732032303137311C301A060355040B13136F6E6C79536F6D65526561736F6E7320434133310C300A0603550403130343524C8304079F80"));
11721172
let err = idp.err().unwrap();
1173-
assert_eq!(err.position().unwrap(), 103u8.into());
1173+
assert_eq!(err.position().unwrap(), 105u8.into());
11741174
assert_eq!(
11751175
ErrorKind::Incomplete {
11761176
expected_len: 106u8.into(),
@@ -1202,7 +1202,13 @@ fn decode_idp_negative_bool_long() {
12021202
let idp =
12031203
IssuingDistributionPoint::from_der(&hex!("30820168A0820161A082015DA4753073310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353129302706035504031320696E6469726563742043524C20666F7220696E64697265637443524C20434136A4753073310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353129302706035504031320696E6469726563742043524C20666F7220696E64697265637443524C20434137A46D306B310B3009060355040613025553311F301D060355040A13165465737420436572746966696361746573203230313731183016060355040B130F696E64697265637443524C204341353121301F0603550403131843524C3120666F7220696E64697265637443524C204341358402FFFF"));
12041204
let err = idp.err().unwrap();
1205-
assert_eq!(ErrorKind::Length { tag: Tag::Boolean }, err.kind());
1205+
assert_eq!(
1206+
ErrorKind::Incomplete {
1207+
expected_len: Length::new(365),
1208+
actual_len: Length::new(364)
1209+
},
1210+
err.kind()
1211+
);
12061212
}
12071213

12081214
#[test]

0 commit comments

Comments
 (0)