Repository navigation
Asn1parse #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aidankeefe2022
wants to merge
8
commits into
wolfSSL:main
Choose a base branch
from
aidankeefe2022:ans1-parser
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,870
−91
Open
Asn1parse #253
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0059177
adding asn1 functionality. testing has been set up matches flag names
aidankeefe2022 cb819ec
review fixes and skoll fixes
aidankeefe2022 3b7d366
Github review and invert of oid table
aidankeefe2022 1f88858
runtime check for oid table
aidankeefe2022 fe986c2
Define change and new compile-time oid table check
aidankeefe2022 9cd0aab
new runtime check for OID table
aidankeefe2022 a132654
rewrote to align with new wolfSSL
aidankeefe2022 89607e0
Asn1 parse update
aidankeefe2022 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| .\" Manpage for wolfssl asn1parse. | ||
| .\" Contact facts@wolfssl.com to correct errors or typos. | ||
| .TH wolfSSL SSL1 "June 2026" "0.2.0" "wolfssl asn1parse man page" | ||
| .SH NAME | ||
| wolfssl-asn1parse, asn1parse \- ASN.1 parsing utility | ||
| .SH SYNOPSIS | ||
| wolfssl asn1parse -in file [-inform DER|PEM|B64] [-out file] [-oid file] [-offset n] [-length n] [-strparse n[,n...]] [-i] [-dump] [-noout] [-help] | ||
| .SH DESCRIPTION | ||
| Parses an ASN.1 encoded structure (for example a certificate, key, or CRL) | ||
| and prints a human readable listing of its tags, lengths, and contents. | ||
| Input may be read in DER, PEM, or Base64 form. | ||
| .SH GENERAL OPTIONS | ||
| -help print the asn1parse help summary and exit. | ||
| .br | ||
| .LP | ||
| -oid file file of extra OID definitions. Each line uses the | ||
| .br | ||
| format: <oid> <shortName> <long name with spaces>. | ||
| .br | ||
| shortName is accepted for compatibility but only the | ||
| .br | ||
| long name is printed. | ||
| .br | ||
| The built in OID table is used unless wolfCLU was | ||
| .br | ||
| configured with --disable-oid-table. | ||
| .br | ||
| Names wolfSSL already knows take precedence over both | ||
| .br | ||
| the -oid file and the built in table. | ||
| .SH I/O OPTIONS | ||
| -in file input file to read the ASN.1 structure from. | ||
| .br | ||
| Required. | ||
| .br | ||
| .LP | ||
| -inform DER|PEM|B64 input file format. One of DER, PEM, or B64 (Base64). | ||
| .br | ||
| Defaults to DER. | ||
| .br | ||
| .LP | ||
| -out file output file for the ASN.1 DER data after processing. | ||
| .br | ||
| Best used with -strparse. | ||
| .br | ||
| .LP | ||
| -noout do not print the parsed output. Requires -out. | ||
| .br | ||
| .LP | ||
| -offset n offset into the DER data at which to begin parsing. | ||
| .br | ||
| For PEM and B64 input this is an offset into the | ||
| .br | ||
| decoded DER, not the file. With -strparse it is an | ||
| .br | ||
| offset into the nested structure. | ||
| .br | ||
| .LP | ||
| -length n number of bytes of DER data to parse. A length past | ||
| .br | ||
| the end of the data is reduced to the bytes remaining. | ||
| .br | ||
| .LP | ||
| -strparse n[,n...] offset to an OCTET/BIT STRING to parse. A comma | ||
| .br | ||
| separated list may be given, e.g. -strparse 702,64. | ||
| .br | ||
| -strparse is applied first, starting from the | ||
| .br | ||
| beginning of the input, and -offset and -length then | ||
| .br | ||
| select bytes within the nested result. | ||
| .SH FORMATTING OPTIONS | ||
| -i indent the output by structure depth instead of | ||
| .br | ||
| drawing branches. | ||
| .br | ||
| .LP | ||
| -dump print data in hex form. | ||
| .SH OUTPUT | ||
| Each line is formatted as: | ||
| .RS | ||
| 0: 4 [1187] (0) SEQUENCE | ||
| .RE | ||
| .LP | ||
| where the first number is the offset, the second is the header length, the | ||
| value in brackets is the data length, and the value in parentheses is the | ||
| depth. Brackets indicate constructed types and a plus indicates a primitive | ||
| type. | ||
| .SH EXAMPLES | ||
| Parse a DER encoded certificate with indented output: | ||
| .RS | ||
| wolfssl asn1parse -inform DER -in cert.der -i | ||
| .RE | ||
| .LP | ||
| Parse a PEM file and print data in hex form: | ||
| .RS | ||
| wolfssl asn1parse -in cert.pem -inform PEM -dump | ||
| .RE | ||
| .SH SEE ALSO | ||
| .BR wolfssl-x509(1) ", " wolfssl-req(1) | ||
| .SH NOTES | ||
| Available only when wolfSSL is built with WOLFSSL_ASN_PRINT and wolfCLU is | ||
| built with filesystem support (not WOLFCLU_NO_FILESYSTEM). The -oid option | ||
| additionally requires object id encoding support (wolfSSL built with | ||
| HAVE_OID_ENCODING, and NO_WC_ENCODE_OBJECT_ID not defined). | ||
| .SH BUGS | ||
| No known bugs at this time. | ||
| .SH AUTHOR | ||
| wolfSSL, Inc. (facts@wolfssl.com) | ||
| .SH COPYRIGHT | ||
| Copyright 2026 wolfSSL Inc. All rights reserved. | ||
| .SH REPORTING BUGS | ||
| Report wolfssl bugs to support@wolfssl.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.