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

Creating a GeneralName::OtherName as a Utf8String #344

Open
DTrippe opened this issue Oct 16, 2024 · 3 comments
Open

Creating a GeneralName::OtherName as a Utf8String #344

DTrippe opened this issue Oct 16, 2024 · 3 comments

Comments

@DTrippe
Copy link

DTrippe commented Oct 16, 2024

Want to start by saying thank you for this awesome library.

I have a question around the OtherName variant in the GeneralName type.

OtherName(InstanceOf<OctetString>),

It looks like this is expected to be an InstanceOf<OctetString>. I'm wondering if there is a way to represent this as a Utf8String? I tried passing several types (std::string::String, and also an encoded AttributeTypeAndValue), but it always ends up being viewed as an OctetString.

While this doesn't really cause a problem when working with the data directly, I did notice OpenSSL marks the fields as "unsupported" in the text output. For example

            X509v3 Issuer Alternative Name:
               othername:<unsupported>, othername:<unsupported>

If I use explicit Utf8String types, however, I do see the othernames as expected.

So, ultimately just wondering if InstanceOf<OctetString> is the right type here, or if rasn::types::Any might work better.

Appreciate any advice.

@XAMPPRocky
Copy link
Collaborator

Thank you for your issue! Would you be able to look at the ASN.1 module and show how it defines OtherName? I think that will be our best guidance here.

@DTrippe
Copy link
Author

DTrippe commented Oct 21, 2024

Sorry, which module is ASN.1?

I only see one instance of OtherName in the lib, and I don't see it ever being defined.

https://github.com/search?q=org%3Alibrasn+OtherName&type=code

@XAMPPRocky
Copy link
Collaborator

I mean the ietf standard that defines PKIX

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