aaronst / macholibre

Mach-O & Universal Binary Parser
Apache License 2.0
143 stars 32 forks source link

Error in parse_certs #10

Closed rammy22 closed 6 years ago

rammy22 commented 7 years ago
Could not parse file: /sample/eb2c3cc63cd753790f29d0ce3004945f7a7a40630230a6f73d971ecf7d22a08f
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 757, in parse_macho
    self.parse_sig(macho)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 672, in parse_sig
    self.parse_certs(signature, offset)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 300, in parse_certs
    signed_data = cms.CMS(self.f.read(size), format='DER')
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/ctypescrypto/cms.py", line 63, in CMS
    raise CMSError("Error parsing CMS data")
CMSError: Error parsing CMS data
    error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data
aaronst commented 6 years ago

This is now fixed.