Git Product home page Git Product logo

Comments (3)

jannschu avatar jannschu commented on May 28, 2024

In the X.509 Style Guide from 2000 some problems with the different string types are discussed. IA5String, PrintableString, VisibleString seem relatively unproblematic, as they are more or less subsets of ASCII.

Teletex/T61String are very odd. BMPString and UniversalString seem two and four byte unicode encodings.

The document also contains a section "Comparing DNs" which is a non-trivial problem because of these string types.

I am not sure what of this is still relevant today. I will try to look into this.

Nevertheless, I think some support for handling the string types would be nice.

from der-parser.

jannschu avatar jannschu commented on May 28, 2024

I used the certificates from these two test sets: [1], [2].

The only string types used were PrintableString, IA5String and UTF8String. I used openssl asn1parse.

There is another test tool, which was easy to find: [3]. I have not looked into this one.

Obviously der-parser is not limited to x509. I would suggest to parse the "easy" string types (with checks of allowed characters) and provide api to access them as &str. For the legacy types only the raw &[u8] access is possible.

from der-parser.

chifflier avatar chifflier commented on May 28, 2024

Closing this, as most string types are now parsed and decoded, and can be obtained in as_str().
Please open new issues for specific string types if others are needed.

Additional note: for X.509, I had to add support for non-RFC-compliant strings (bad encoding)m for ex. in rusticata/x509-parser@b3beae8

from der-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.