Name

asn1parse

Synopsis

The asn1parse command is a diagnostic utility that parses ASN.1 structures. It can also be used to extract data from ASN.1-formatted data.

Options

-inform PEM|DER

Specify the format of the input data, which may be either DER or PEM. The default is PEM.

-in filename

Specify the name of a file to read for input. The default is to read from stdin.

-out filename

Specify the name of a file to write output to. The default is to write to stdout.

-noout

Cause all output except for error messages to be suppressed.

-offset number

Specify the byte offset of the input data to start parsing at.

-length number

Specify the number of bytes to include in the parse.

-i

Cause the output to be indented for readability.

-oid filename

Specify the name of a file containing extra OID definitions. See Section below for more information on the format of this file.

-strparse offset

Cause the content octets starting at the specified byte offset to be parsed. This option may be specified multiple times.

-dump

Cause unknown data to be displayed in hexadecimal form.

-dlimit number

Specify the maximum number of bytes of unknown data to be displayed. The default is to display all of it.

Notes

Data in the ASN.1 format is composed of objects, some with an assigned object identifier (OID). An object identifier is a sequence of numbers that is normally represented by separating each number in the sequence with a period. Because object identifiers are often composed of many numbers, they ...

Get Network Security with OpenSSL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.