Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple DnValue per key in DistinguishedName #81

Open
avalent opened this issue Mar 31, 2022 · 1 comment
Open

Support multiple DnValue per key in DistinguishedName #81

avalent opened this issue Mar 31, 2022 · 1 comment

Comments

@avalent
Copy link

avalent commented Mar 31, 2022

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
@est31
Copy link
Member

est31 commented Mar 31, 2022

This needs a major change, maybe even a rename of the API so that users are aware that something changed.

@cpu cpu mentioned this issue Dec 8, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants