|
| 1 | +.\" Manpage for wolfssl asn1parse. |
| 2 | +.\" Contact facts@wolfssl.com to correct errors or typos. |
| 3 | +.TH wolfSSL SSL1 "June 2026" "0.2.0" "wolfssl asn1parse man page" |
| 4 | +.SH NAME |
| 5 | +wolfssl-asn1parse, asn1parse \- ASN.1 parsing utility |
| 6 | +.SH SYNOPSIS |
| 7 | +wolfssl asn1parse [-in file] [-inform DER|PEM|B64] [-out file] [-oid file] [-offset n] [-length n] [-strparse n[,n...]] [-i] [-dump] [-noout] [-help] |
| 8 | +.SH DESCRIPTION |
| 9 | +Parses an ASN.1 encoded structure (for example a certificate, key, or CRL) |
| 10 | +and prints a human readable listing of its tags, lengths, and contents. |
| 11 | +Input may be read in DER, PEM, or Base64 form. |
| 12 | +.SH GENERAL OPTIONS |
| 13 | +-help print the asn1parse help summary and exit. |
| 14 | +.br |
| 15 | +.LP |
| 16 | +-oid file file of extra OID definitions. Each line uses the |
| 17 | +.br |
| 18 | + format: <oid> <shortName> <long name with spaces>. |
| 19 | +.br |
| 20 | + To use the built in OID table, configure wolfCLU with |
| 21 | +.br |
| 22 | + --enable-oid-table. |
| 23 | +.SH I/O OPTIONS |
| 24 | +-in file input file to read the ASN.1 structure from. |
| 25 | +.br |
| 26 | +.LP |
| 27 | +-inform DER|PEM|B64 input file format. One of DER, PEM, or B64 (Base64). |
| 28 | +.br |
| 29 | +.LP |
| 30 | +-out file output file for the ASN.1 DER data after processing. |
| 31 | +.br |
| 32 | + Best used with -strparse. |
| 33 | +.br |
| 34 | +.LP |
| 35 | +-noout do not print the parsed output. |
| 36 | +.br |
| 37 | +.LP |
| 38 | +-offset n offset into the file at which to begin parsing. |
| 39 | +.br |
| 40 | +.LP |
| 41 | +-length n number of bytes to parse. |
| 42 | +.br |
| 43 | +.LP |
| 44 | +-strparse n[,n...] offset to an OCTET/BIT STRING to parse. A comma |
| 45 | +.br |
| 46 | + separated list may be given, e.g. -strparse 702,64. |
| 47 | +.SH FORMATTING OPTIONS |
| 48 | +-i indent the output according to structure depth. |
| 49 | +.br |
| 50 | +.LP |
| 51 | +-dump print unknown data in hex form. |
| 52 | +.SH OUTPUT |
| 53 | +Each line is formatted as: |
| 54 | +.RS |
| 55 | + 0: 4 [1187] (0) SEQUENCE |
| 56 | +.RE |
| 57 | +.LP |
| 58 | +where the first number is the offset, the second is the header length, the |
| 59 | +value in brackets is the data length, and the value in parentheses is the |
| 60 | +depth. Brackets indicate constructed types and a plus indicates a primitive |
| 61 | +type. |
| 62 | +.SH EXAMPLES |
| 63 | +Parse a DER encoded certificate with indented output: |
| 64 | +.RS |
| 65 | +wolfssl asn1parse -inform DER -in cert.der -i |
| 66 | +.RE |
| 67 | +.LP |
| 68 | +Parse a PEM file and dump unknown data as hex: |
| 69 | +.RS |
| 70 | +wolfssl asn1parse -in cert.pem -inform PEM -dump |
| 71 | +.RE |
| 72 | +.SH SEE ALSO |
| 73 | +.BR wolfssl-x509(1) ", " wolfssl-req(1) |
| 74 | +.SH NOTES |
| 75 | +Available only when wolfSSL is built with WOLFSSL_ASN_PRINT and without |
| 76 | +NO_FILESYSTEM. The -oid option additionally requires object id encoding |
| 77 | +support (NO_WC_ENCODE_OBJECT_ID must not be defined). For OpenSSL |
| 78 | +compatibility the tool reserves additional flags (e.g. -genstr, -genconf, |
| 79 | +-item, -strictpem, -dlimit) that are not yet implemented. |
| 80 | +.SH BUGS |
| 81 | +No known bugs at this time. |
| 82 | +.SH AUTHOR |
| 83 | +wolfSSL, Inc. (facts@wolfssl.com) |
| 84 | +.SH COPYRIGHT |
| 85 | +Copyright 2026 wolfSSL Inc. All rights reserved. |
| 86 | +.SH REPORTING BUGS |
| 87 | +Report wolfssl bugs to support@wolfssl.com |
0 commit comments