Will Bond
Will Bond
To use the current API, you'd need to use `asn1crypto.parser.parse()`. This will be a little wasteful since you don't really want the header, contents and trailer returned as separate byte...
I think we can improve the parse functions to be sure to raise a ValueError
I believe the `optional` part is there for parsing the invalid form. You can see it mentioned in the changelog under version 0.13.0. Can you post the code you are...
I'm going to reopen this, as a record that we should find a way to parse the invalid encoding, but always generate the valid encoding. It may end up being...
The encoding from `a` seems to be correct, and is optionally omitting the attributes since it is "empty" - https://lapo.it/asn1js/#MG4CAQAwDjEMMAoGA1UEAwwDZm9vMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4wKygiF54dF09fhqdWV8wgE8jDGjxDXQG0iW4UVv4e0jJn63lSz1QStNaG_QPcXuq35v3e9vjS-nZDU_-fR7Bw. The one from `b` seems incorrect, as it has appending...
Shows how much I remember of the nuance of ASN.1 encoding off of the top of my head.
Oh, wait, one is a correct encoding of the field omitted and the other is an empty set? It doesn't sound to me like `optional` is broken, at all, if...
> I mean if I set 'optional': False I can still omit the field. My expectation was to get some Exception instead. Can you provide some sample code that shows...
To further clarify: > As far as I recall, it isn't used to validate that a field has been set. Should read: "As far as I recall, it isn't used...
This is likely a result of overhead related to specific encoding decisions in the ASN.1 modules, combined with Python runtime performance characteristics. The first step would be to profile and...