Atkelar (atkelar) wrote,

ASN.1 update...

Some semi-good news for everyone who's interested:

I re-wrote the parser almost from the ground up to be a "we'll try until nothing goes anymore" kind of parser. Looping through each and every module that gets compiled and trying to parse *something*. Bailing out, once nothing could be parsed in a single loop.

Now, after some repeating "module x.y.z" not found and "let's ask Google", I found some ASN.1 sources around the interwebs. It took me the better part of a day to come across this page her. Yes, the ITU-T provides a listing of their ASN1 modules for search and download. Google didn't find that listing however. I found it in a link in an obscure message board.

And it gets better (or worse): some of the entries in the ITU-T database seem broken. I came across at least one module that had a completely wrong OID associated with it (found it by name later on) and one module that has only the first page of sourcecode listet (cut off clearly mid-source code). x.x

aaaanyway. After repeatedly "parsing" - "module x.y.z" not found again, I now have all the modules required for the "pkcs-10" (certificate request) module. The module defines about 10 attributes and three or so data types. But you know how many dependent modules it loads (through "standard" modules)? - 92! ninety-two. Yep.

On another note: I found out some details about the ASN syntax that makes parsing it (a tiny bit) easier: it's defined that TYPE names have to start with an uppercase letter while values have to start with a lower case. That distinction is required to make sense of it actually... Have I told you that I hate that syntax???

At least they did away with "MACRO"s in 1994. Was afraid I had to include that too. Macros essentially defined additions to the syntax of ASN1 WITHIN ASN1. Talk about circular logic!

Tags: asn, computer, itu-t, programming, standard

  • What a couple of days...

    Yesterday was nice. Had an awesome lunch and then I got myself a nice tablesaw. Not quite "pro" but very close at least. sturdy when compared with…

  • WTF coding #2 - CDNs

    Do you like shooting yourself into your foot? Of course the answer is likely "no!" but some people seem to like it... I can't explain why else…

  • WTF-coding...

    I would like to use the opportunity to start something that might turn into a small series. I like to call it "WTF Coding". Since I'm "native" to the…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment