Skip to content

Incorrect Object Identifier DER Encoding #1520

Description

@zhengyao-lin

The encoding seems to be incorrect for certain object identifiers at the boundary of arc length. For example:

// decoded: 1.2.0
println!("decoded: {:?}",  ObjectIdentifier::from_der(&ObjectIdentifier::new_unwrap("1.2.128").to_der().unwrap()));

// decoded: 1.2.0.0
println!("decoded: {:?}",  ObjectIdentifier::from_der(&ObjectIdentifier::new_unwrap("1.2.16384").to_der().unwrap()));

I'm using this crate:

der = { version = "0.7.9", features = [ "alloc", "oid" ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions