Commons secrets frequently needs to manipulate ASN1 and certificate encodings, as well as perform common byte sequence manipulations such as concat/append. As an example, see https://stash.forgerock.org/projects/COMMONS/repos/forgerock-commons/pull-requests/1378
It would be nice if Neil didn't have to re-implement this functionality. Note that LDAP uses DER encoding, which is compatible with security use-cases.
This issue can be closed once the following conditions have been met:
- created a separate module containing our ASN1 reader/writer implementations and their dependencies such as ByteString classes
- collapsed the ASN1Reader/Writer class hierarchies, including merging in the X509CertificateBuilder class. This depends on removal of Grizzly which has a specialized implementation of these classes at the moment
- aligned the ASN1Reader/Writer classes so that they have equivalent read/write methods
- enhanced the APIs to take advantage of JDK8 features such as lambdas. For example, we could implement lambdarized methods for reading and writing sequences and sets which would automatically take care of end sequences and also have the nice property of increasing the indentation level which aids readability.