tlslite.utils.asn1parser module
Abstract Syntax Notation One (ASN.1) parsing
- class tlslite.utils.asn1parser.ASN1Parser(bytes)[source]
Bases:
object
Parser and storage of ASN.1 DER encoded objects.
- Variables:
- __init__(bytes)[source]
Create an object from bytes.
- Parameters:
bytes (bytearray) – DER encoded ASN.1 object
- getChild(which)[source]
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
- class tlslite.utils.asn1parser.ASN1Type(tag_class, is_primitive, tag_id)[source]
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: