key: asn1 short_name: ASN.1 Object Dumping Code License name: ASN.1 Object Dumping Code License category: Permissive owner: ASN.1 Project spdx_license_key: LicenseRef-scancode-asn1 ignorable_copyrights: - copyright Peter Gutmann ignorable_holders: - Peter Gutmann ignorable_authors: - David Kemp ignorable_urls: - http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c - http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg ignorable_emails: - Tor.Rustad@bbs.no - bcouillard@chrysalis-its.com - chris.ridd@isode.com - d.boyce@isode.com - dpkemp@missi.ncsc.mil - geoff@raas.co.nz - h.b.furuseth@usit.uio.no - hamrick@rsa.com - hans-olof.hermansson@postnet.se - john.hughes@entegrity.com - jsweeny@us.ibm.com - kjetil.barvik@bbs.no - pgut001@cs.auckland.ac.nz - ronald@trustpoint.com text: | ASN.1 Object Dumping Code License ASN.1 object dumping code, copyright Peter Gutmann , based on ASN.1 dump program by David Kemp , with contributions from various people including Matthew Hamrick , Bruno Couillard , Hallvard Furuseth , Geoff Thorpe , David Boyce , John Hughes , Life is hard, and then you die , Hans-Olof Hermansson , Tor Rustad , Kjetil Barvik , James Sweeny , Chris Ridd , and several other people whose names I've misplaced (a number of those email addresses probably no longer work, since this code has been around for awhile). Available from http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c Last updated 7 January 2009 (version 20090107, if you prefer it that way). To build under Windows, use 'cl /MD dumpasn1.c'. To build on OS390 or z/OS, use '/bin/c89 -D OS390 -o dumpasn1 dumpasn1.c'. This code grew slowly over time without much design or planning, and with extra features being tacked on as required. It's not representative of my normal coding style. This version of dumpasn1 requires a config file dumpasn1.cfg to be present in the same location as the program itself or in a standard directory where binaries live (it will run without it but will display a warning message, you can configure the path either by hardcoding it in or using an environment variable as explained further down). The config file is available from http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg This code assumes that the input data is binary, having come from a MIME-aware mailer or been piped through a decoding utility if the original format used base64 encoding. If you need to decode it, it's recommended that you use a utility like uudeview, which will strip virtually any kind of encoding (MIME, PEM, PGP, whatever) to recover the binary original. You can use this code in whatever way you want, as long as you don't try to claim you wrote it. Editing notes: Tabs to 4, phasers to stun (and in case anyone wants to complain about that, see "Program Indentation and Comprehensiblity", Richard Miara, Joyce Musselman, Juan Navarro, and Ben Shneiderman, Communications of the ACM, Vol.26, No.11 (November 1983), p.861)