rustls / rustls/rcgen

Support multiple DnValue per key in DistinguishedName

Open
#81 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
505
Forks
157
Avg merge
39m
Merged PRs (30d)
1

Description

I need to generate a certificate with a subject line containing multiple OU key-value pairs:

Subject: OU=certtype:instance, OU=compartment:compartment, OU=instance:instance

The problem is subsequent calls to DistinguishedName::push overwrite the previous value:

params.distinguished_name.push(DnType::OrganizationalUnitName, format!("certtype:{}", certtype));
params.distinguished_name.push(DnType::OrganizationalUnitName, format!("compartment:{}", compartment));
params.distinguished_name.push(DnType::OrganizationalUnitName, format!("instance:{}", instance));

This leaves me with a subject containing only the last value:

Subject: OU=instance:instance

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 at the DistinguishedName::push entry point shown in the issue and trace how repeated OrganizationalUnitName values are stored and rendered. Done means successive pushes preserve all OU values so the generated subject contains each requested key-value pair.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.