-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor fromDer algorithm. - More strictly follow structure lengths. - Improve remaining data checks to avoid overruns with unchecked buffer get calls. - Improve length sanity checks. - Allow options for fromDer. Handle old strict call signature. - Add decodeBinaryStrings flag to control decoding of BIT STRINGs. - Improve handling of ASN.1 encapsulated in BIT STREAMs. Many parsing failure cases eliminated. - Store "raw" BIT STREAM bytes so toDer() and validate() have access to what may have decoded as ASN.1 but was just plain bytes. - Add tests. Note that with these changes ASN.1 may still parse BIT STREAMs as ASN.1 even though they are plain bytes. This could happen with signatures. However, the "raw" data is now available and used when going back to bytes with toDer(). To avoid such parsing completely will require use of structural schemas.
- Loading branch information
Showing
2 changed files
with
832 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.