FreeDSx / ASN1

An ASN.1 Library for PHP.
MIT License
10 stars 3 forks source link

Add a Parser / Compiler for ASN.1 Files #3

Open ChadSikorra opened 5 years ago

ChadSikorra commented 5 years ago

It would be very handy to have a compiler capable of parsing ASN.1 files to PHP classes. And then using those PHP classes to build the requisite ASN.1 data structures to be encoded. Or take an encoded ASN.1 data structure and translate that to the PHP classes that were built.

I also have a need for general ASN.1 parsing in the SNMP library for MIBs to pick apart the generated AST (a subset anyway). This requires a parser based off X.680, and several other components:

ChadSikorra commented 5 years ago

Making lots of progress on this. I can successfully parse several ASN.1 modules, such as the LDAP, SNMP, and Kerberos definition files from their RFCs. If I had to guess, I probably have 65% of the X.680 doc covered from a parsing perspective. Still lots of work to be done and reorganization of the code I have so far.

ChadSikorra commented 5 years ago

X.680 doc parsing is essentially complete (minus a few minor things that aren't commonly used). Working on the X.681, X.682, X.683 parsing.

ChadSikorra commented 4 years ago

I have started to pick this back up. There is still much to do, but it now resolves references,, loads imports automatically, and even has some macro support so I can use this for MIB parsing. I need to focus on more tests soon to have something releasable.