RustCrypto / RustCrypto/formats

oiddbgen: parse types aliased to OBJECT IDENTIFIER

Open
#1,323 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
338
Forks
188
Avg merge
4d 6h
Merged PRs (30d)
15

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the oiddbgen behavior described in the issue and the referenced proof-of-concept, especially the generated src/db/gen.rs. Confirm how aliases such as AttributeType are represented, then define completion as having the relevant aliased OBJECT IDENTIFIER values picked up by the generator.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.