Conversation
alex
reviewed
Apr 9, 2026
docs/hazmat/asn1/reference.rst
Outdated
Comment on lines
+14
to
+16
| .. function:: decode_der(asn1_type, data) | ||
|
|
||
| Deserialize a DER-encoded byte string into an instance of ``cls``. |
Contributor
Author
There was a problem hiding this comment.
ah missed that one, fixed!
docs/hazmat/asn1/reference.rst
Outdated
|
|
||
| .. decorator:: sequence | ||
|
|
||
| A class decorator that registers a class as an ASN.1 SEQUENCE. Fields |
Member
There was a problem hiding this comment.
Suggested change
| A class decorator that registers a class as an ASN.1 SEQUENCE. Fields | |
| A class decorator that registers a class as an ASN.1 ``SEQUENCE``. Fields |
docs/hazmat/asn1/reference.rst
Outdated
Comment on lines
+86
to
+93
| The following built-in Python types are supported as field types in | ||
| :func:`sequence`-decorated classes: | ||
|
|
||
| * ``int`` -- INTEGER | ||
| * ``bool`` -- BOOLEAN | ||
| * ``bytes`` -- OCTET STRING | ||
| * ``str`` -- UTF8String | ||
|
|
Member
There was a problem hiding this comment.
Not sure the sequence docs are the right place for this mapping.
Contributor
Author
There was a problem hiding this comment.
moved them to the beginning of the section, before sequence
alex
reviewed
Apr 9, 2026
| ===== | ||
|
|
||
| .. note:: | ||
| While usable, these APIs should be considered unstable and not yet |
Member
There was a problem hiding this comment.
we should replicate this in the reference file (and any other files in this directory), same with the hazmat warning
Contributor
Author
There was a problem hiding this comment.
done. I also formatted the occurrences of the other ASN.1 type names (e.g: PrintableString -> PrintableString)
alex
approved these changes
Apr 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add the reference doc for the ASN.1 API. After this, we can add a "Tutorial" or "Overview" doc that is more of a walkthrough for new users.
Link to CI build of the docs: https://cryptography--14623.org.readthedocs.build/en/14623/hazmat/asn1/
Part of #12283