dumpasn1 - Man Page

ASN.1 object dump/syntax check program

Synopsis

/bin/dumpasn1 [options] <file>

Description

dumpasn1 is an ASN.1 display and diagnostic tool used to display binary ASN.1-encoded data in human-readable form.

The program 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 most kinds of encoding (MIME, PEM, PGP, whatever) to recover the binary original.

Options

Input Options

-

Take input from stdin (some display options will be disabled)

-q

Disable warning about stdin use affecting display options

-<number>

Start <number> bytes into the file

--

End of arg list

-c<file>

Read Object Identifier info from alternate config file (values will override equivalents in global config file)

Output Options

-f<file>

Dump object at offset -<number> to file (allows data to be extracted from encapsulating objects)

-w<number>

Set width of output, default = 80 columns

Display Options

-a

Print all data in long data blocks, not just the first 128 bytes

-d

Print dots to show column alignment

-g

Display ASN.1 structure outline only (no primitive objects)

-h

Hex dump object header (tag+length) before the decoded output

-hh

Same as -h but display more of the object as hex data

-i

Use shallow indenting, for deeply-nested objects

-l

Long format, display extra info about Object Identifiers

-m<number>

Maximum nesting level for which to display content

-p

Pure ASN.1 output without encoding information

-t

Display text values next to hex dump of data

-v

Verbose mode, equivalent to -ahlt

Format Options

-e

Don't print encapsulated data inside OCTET/BIT STRINGs

-r

Print bits in BIT STRING as encoded in reverse order

-u

Don't format UTCTime/GeneralizedTime string data

-x

Display size and offset in hex not decimal

Checking Options

-o

Don't check validity of character strings hidden in octet strings

-s

Syntax check only, don't dump ASN.1 structures

-z

Allow zero-length items

Warnings generated by deprecated OIDs require the use of '-l' to be displayed.

Program return code is the number of errors found or EXIT_SUCCESS.

Files

./dumpasn1.cfg, $HOME/.dumpasn1.cfg, /etc/dumpasn1/dumpasn1.cfg: This is the configuration file, it will be searched in this order. It contains OIDs commonly used.

Authors

ASN.1 data display 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, David Lemley, John Tobey, James Manger, Igor Perminov, and several other people whose names I've misplaced.

dumpasn1 is available at https://github.com/cryptlib/dumpasn1/

Comments

This man page has been derived from the internal help page.

Referenced By

gdcmanon(1).

User Manual September 2025