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

Make RDN.Attribute.Value conversion to ASN1Any public #215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baarde
Copy link
Contributor

@baarde baarde commented Dec 17, 2024

When the value is not a printable or UTF8 string, it may be useful to be able to access the underlying encoded bytes.

When the value is not a printable or UTF8 string, it may be useful to be able to access the underlying encoded bytes.
@baarde
Copy link
Contributor Author

baarde commented Dec 17, 2024

I think it makes sense to expose this method, as we already have public methods for converting between Value and String and from ASN1Any to Value (but not the other way around).

Currently, we can access the value's serialized bytes by encoding then decoding the whole attribute as a custom type. It works but it's a little bit involved.

@erikgadireddi
Copy link

@baarde i would also appreciate this change.
I also find out that RDN.Attribute.Value might not be UTF8 or printable.
For example teletext string 😅
So this change makes it easier for me too. 🤞

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change, and it costs us absolutely nothing. Thanks @baarde!

@Lukasa Lukasa added the 🆕 semver/minor Adds new public API. label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants