diff --git a/blockset-lib/src/asn1.rs b/blockset-lib/src/asn1.rs index a5e826ec..0eda8fc2 100644 --- a/blockset-lib/src/asn1.rs +++ b/blockset-lib/src/asn1.rs @@ -47,6 +47,7 @@ impl Any { match self { Any::Bool(v) => f(v), Any::Integer(v) => f(v), + Any::ObjectIdentifier(v) => f(v), _ => todo!(), } } @@ -67,6 +68,7 @@ impl Any { match tag { bool::TAG => Any::Bool(f(a)), i128::TAG => Any::Integer(f(a)), + ObjectIdentifier::TAG => Any::ObjectIdentifier(f(a)), _ => todo!(), } } else { @@ -259,6 +261,14 @@ mod test { Any::Integer(i128::MIN + 1), &[2, 16, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], ); + any_f( + Any::ObjectIdentifier(ObjectIdentifier { + a0: 2, + a1: 0, + a2: [1, 235].cast(), + }), + &[6, 4, 80, 1, 0x81, 0x6b], + ); } #[wasm_bindgen_test]