Extensibility story
qmfrederik opened this issue · comments
The current implementation of DerConverter
is incomplete - some types, such as the various string types or the real type, are missing.
Plus, ASN.1 is by default extensible. For example, you can define custom types in contexts.
There's currently no good story for extensibility in the DerConverter
library, short of forking.
For example, adding a new type currently requires you to fork the library, because you cannot easily inject your type in the types the DerAsnType.Parse
method considers. Neither can you create your own parser since the DerAsn*(Queue<byte> rawData)
constructors are internal.
It would be helpful it were easier to extend the library.
Sorry this is taking a bit of time... I'm still refactoring the old types to the new way of working, but you might already take a look in the branch https://github.com/huysentruitw/pem-utils/commits/feature/refactor-3.0.0 to see if the new design would be flexible enough.
Refactored version v3.0 should make it a lot easier to extend. Closing for now.