LinuxCommandLibrary

asn1parse.1s

Parse ASN.1 data

TLDR

Parse ASN.1 data

$ asn1parse -in [file.der]
copy
Parse PEM encoded file
$ asn1parse -in [file.pem] -inform PEM
copy
Parse with offset
$ asn1parse -in [file.der] -offset [100]
copy
Show structure in detail
$ asn1parse -in [file.der] -dump
copy

SYNOPSIS

asn1parse [-in file] [-inform format] [-offset n] [-dump] [options]

DESCRIPTION

asn1parse is an OpenSSL diagnostic utility that parses ASN.1 (Abstract Syntax Notation One) encoded data. It displays the structure of certificates, keys, and other cryptographic objects in a human-readable format.
The tool is invaluable for debugging certificate issues, understanding data structures, and analyzing encoded data.

PARAMETERS

-in file

Input file
-inform format
Input format: PEM or DER
-out file
Output file
-noout
Don't output parsed structure
-offset n
Start parsing at offset n
-length n
Parse n bytes
-dump
Hex dump of content
-strparse offset
Parse nested structure at offset
-genstr string
Generate ASN.1 from string

CAVEATS

Requires understanding of ASN.1 structure. Output can be verbose for complex objects. Mainly for debugging, not routine use.

HISTORY

asn1parse is part of OpenSSL, which has been the standard cryptographic toolkit since the late 1990s.

SEE ALSO

openssl(1), x509(1), req(1)

Copied to clipboard