DominikHorn / ASN1Parser

Minimalistic Swift parser for ASN.1 data. Currently supports DER and therefore also BER binary format
MIT License
8 stars 3 forks source link

Fixed length calculation to successfully parse keys of certificates and added printable string #4

Open hasalaha opened 1 year ago

hasalaha commented 1 year ago

I tried ASN1Parser to parse Certificate Data using

SecCertificateCopyNormalizedIssuerSequence, (https://developer.apple.com/documentation/security/2799310-seccertificatecopynormalizedissu) but the Library crashed. Same for SecKeyCopyExternalRepresentation (https://developer.apple.com/documentation/security/1643698-seckeycopyexternalrepresentation/)

For the first error I added "Printable String" as DER-Type, for the second I fixed the length calculation. See added Testcase "ParseCertificateTests".

If you like it, please accept pull request.