ASN1_PRINT(1)

πŸ“¦ version 7.8.0-unstable-2024-09, in nixpkgs unstable

πŸ’– NAME πŸ’–

asn1_print β€” dump ASN.1 DER encoded values ✨ And yes bestie, this whole page is the ASN1_PRINT(1) manual from the General Commands Manual πŸ’…

🌸 SYNOPSIS 🌸

asn1_print [-i | --no-indent] [-I | --inner] [-l | --list-types]
           [-A | --try-all-types] [-S | --raw-sequence]
           [-n | --no-print] [-q | --quiet] [--test-encode]
           [--test-copy] [-l -v | --version] [-l -h | --help]
           [FILE [TypeName...]]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so asn1_print dumps ASN.1 DER-encoded values, no cap 🫢

If you give it one or more TypeName arguments, asn1_print prints the value in a JSON-like format using its knowledge of the ASN.1 modules defining those types. It stops at the first type for which it can successfully decode the value. Slay.

If TypeNames are given, they must be the names of ASN.1 types exported by an ASN.1 modules that are compiled into asn1_print. Use the --try-all-types option to attempt decoding as all ASN.1 types known to asn1_print. That option is main character energy, fr fr.

If neither any TypeName nor --try-all-types are given, then the value will be parsed and displayed using just the self-describing nature of DER. Iconic.

πŸ’… Options supported: πŸ’…

  • -i, --no-indent β€” do not indent dump. Zero indentation, zero problems ✨
  • -I, --inner β€” try to parse inner structures of OCTET STRING and constructed values. Peek inside, bestie πŸ‘€
  • -l, --list-types β€” list all types known to asn1_print. It's giving directory of types πŸ’…
  • -A, --try-all-types β€” attempt to decode the value as any of all types known to asn1_print. Throw the whole type catalog at it πŸ”₯
  • -S, --raw-sequence β€” if a value parses as a given TypeName but any bytes are left over, try to parse those separately as well until all bytes are consumed or an error occurs. Leftover bytes said "not me" and asn1_print said "actually yes you" 😭
  • -n, --no-print β€” for the case where -A or --try-all-types or where a TypeName is given, do not output a JSON representation of the value, just attempt to decode it. Useful for fuzzing. Decode-only vibe check πŸ’€
  • -q, --quiet β€” similar to -n, --no-print but JSON output will be formatted, just not output. As with -n, --no-print, this option requires -A -/ --try-all-types or that a TypeName be given. Useful for fuzzing. Quiet but still formatted, the duality of woman πŸ’œ
  • --test-encode β€” check that encoding produces the same value as decoding. Useful for fuzzing. Round-trip slay 🌈
  • --test-copy β€” test copy functions. Useful for fuzzing. Copy functions getting tested, periodt 🧚
  • -v, --version β€” that's the whole entry; no extra description given here ✨
  • -h, --help β€” that's the whole entry too; no extra description given here πŸŽ€

Big cute sign-off: this page comes from source/version HEIMDAL, dated February 22, 2021, and it's the ASN1_PRINT(1) manual. Bye bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from