Skip to content

oiddbgen: parse types aliased to OBJECT IDENTIFIER #1323

Open
@simpsoneric

Description

@simpsoneric

As part of RFC 5280, there are a few types that are essentially aliases for OBJECT IDENTIFIER.

One example is the AttributeType used in the x509 subject name:

AttributeType ::= OBJECT IDENTIFIER

-- Arc for standard naming attributes

id-at OBJECT IDENTIFIER ::= { joint-iso-ccitt(2) ds(5) 4 }

-- Naming attributes of type X520name

id-at-name                AttributeType ::= { id-at 41 }
id-at-surname             AttributeType ::= { id-at  4 }
id-at-givenName           AttributeType ::= { id-at 42 }
id-at-initials            AttributeType ::= { id-at 43 }
id-at-generationQualifier AttributeType ::= { id-at 44 }

[...]

-- Naming attributes of type X520SerialNumber

id-at-serialNumber      AttributeType ::= { id-at 5 }

Since items like the id-at-name are not directly of type OBJECT IDENTIFIER, the oiddbgen does not pick them up.

I'm not sure about the best way to handle this, but I gave it a proof-of-concept at https://github.com/simpsoneric/formats/tree/object-id-aliases

The resulting src/db/gen.rs picks up the OIDs I was interested in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions