tlslite.utils.asn1parser module¶
Abstract Syntax Notation One (ASN.1) parsing
-
class
tlslite.utils.asn1parser.
ASN1Parser
(bytes)¶ Bases:
object
Parser and storage of ASN.1 DER encoded objects.
- Variables
-
__init__
(bytes)¶ Create an object from bytes.
- Parameters
bytes (bytearray) – DER encoded ASN.1 object
-
getChild
(which)¶ Return n-th child assuming that the object is a SEQUENCE.
- Parameters
which (int) – ordinal of the child to return
- Return type
- Returns
decoded child object
-
getChildBytes
(which)¶ Return raw encoding of n-th child, assume self is a SEQUENCE
-
class
tlslite.utils.asn1parser.
ASN1Type
(tag_class, is_primitive, tag_id)¶ Bases:
object
Class that represents the ASN.1 type bit octet. Consists of a class (universal(0), application(1), context-specific(2) or private(3)), boolean value that indicates if a type is constructed or primitive and the ASN1 type itself.
- Variables
-
__init__
(tag_class, is_primitive, tag_id)¶ Initialize self. See help(type(self)) for accurate signature.