/var/opt/nydus/ops/asn1crypto/__pycache__
NameSizeModeActions
algos.cpython-312.pyc332150644editdlrm
cms.cpython-312.pyc333320644editdlrm
core.cpython-312.pyc1752560644editdlrm
crl.cpython-312.pyc187590644editdlrm
csr.cpython-312.pyc45550644editdlrm
keys.cpython-312.pyc411450644editdlrm
ocsp.cpython-312.pyc233820644editdlrm
parser.cpython-312.pyc94080644editdlrm
pdf.cpython-312.pyc34580644editdlrm
pem.cpython-312.pyc71120644editdlrm
pkcs12.cpython-312.pyc64300644editdlrm
tsp.cpython-312.pyc111320644editdlrm
util.cpython-312.pyc276150644editdlrm
version.cpython-312.pyc3670644editdlrm
x509.cpython-312.pyc1065730644editdlrm
_errors.cpython-312.pyc15000644editdlrm
_inet.cpython-312.pyc55890644editdlrm
_int.cpython-312.pyc7960644editdlrm
_iri.cpython-312.pyc97750644editdlrm
_ordereddict.cpython-312.pyc55550644editdlrm
_teletex_codec.cpython-312.pyc37660644editdlrm
_types.cpython-312.pyc15680644editdlrm
__init__.cpython-312.pyc12440644editdlrm
Edit: /var/opt/nydus/ops/asn1crypto/__pycache__/parser.cpython-312.pyc (9408B)
M j#dZddlmZmZmZmZddlZddlmZm Z m Z ddl m Z m Z ejdkZdZd Zd Zdd Zd Zdd ZdZy)z Functions for parsing and dumping using the ASN.1 DER encoding. Exports the following items: - emit() - parse() - peek() Other type classes are defined that help compose the types listed above. )unicode_literalsdivisionabsolute_importprint_functionN)byte_clschr_cls type_name)int_from_bytes int_to_bytes)zOOPP zVaZENOO fc ";i>OOPP zVaZ86ABB c3 89S>IJJ Qw@3FGG h )@9XCVVWW X 6 AAct|tstdt|zt |}t ||\}}|r||k7rt d||z z|S)al Parses a byte string of ASN.1 BER/DER-encoded data. This is typically not useful. Instead, use one of the standard classes from asn1crypto.core, or construct a new class with specific fields, and call the .load() class method. :param contents: A byte string of BER/DER-encoded data :param strict: A boolean indicating if trailing data should be forbidden - if so, a ValueError will be raised when trailing data exists :raises: ValueError - when the contents do not contain an ASN.1 header or are truncated in some way TypeError - when contents is not a byte string :return: A 6-element tuple: - 0: integer class (0 to 3) - 1: integer method - 2: integer tag - 3: byte string header - 4: byte string content - 5: byte string trailer rz4Extra data - %d bytes of trailing data were provided)rrrr len_parser)rstrict contents_leninfoconsumeds rparser$Ksd: h )@9XCVVWWx=LHl3ND( (l*OS_bjSjkll Krct|tstdt|zt |t |\}}|S)aW Parses a byte string of ASN.1 BER/DER-encoded data to find the length This is typically used to look into an encoded value to see how long the next chunk of ASN.1-encoded data is. Primarily it is useful when a value is a concatenation of multiple values. :param contents: A byte string of BER/DER-encoded data :raises: ValueError - when the contents do not contain an ASN.1 header or are truncated in some way TypeError - when contents is not a byte string :return: An integer with the number of bytes occupied by the ASN.1 value r)rrrr rr)rr"r#s rpeekr&rs=& h )@9XCVVWWHc(m4ND( Orc |tkDr td|}||dzkrttd||z fztrt ||n||}|dz }|dz}|dz dz}|dk(r|d} ||dzkrttd||z fztrt ||n||} |dz }| dk(r|dk(r td|dz}|| d zz }| d z dk(rni|dkr td||dzkrttd||z fztrt ||n||} |dz }d } | d z dk(r || d zz} n| d z} | r;||| zkrtt| ||z fz|| z }|t ||| z |d z} nT|s td|} || dzks || | dzdk7r+t ||| d|dz\}} || dzkr|| | dzdk7r+| dz } d} | |kDrtt| |z ||z fz|r|| fS|dz |||||||| t| z | f| fS)a Parses a byte string into component parts :param encoded_data: A byte string that contains BER-encoded data :param data_len: The integer length of the encoded data :param pointer: The index in the byte string to parse from :param lengths_only: A boolean to cause the call to return a 2-element tuple of the integer number of bytes in the header and the integer number of bytes in the contents. Internal use only. :param depth: The recursion depth when evaluating indefinite-length encoding. :return: A 2-element tuple: - 0: A tuple of (class_, method, tag, header, content, trailer) - 1: An integer indicating how many bytes were consumed z*Indefinite-length recursion limit exceededrrTzNon-minimal tag encodingrF)signedz-Indefinite-length element must be constructeds) lengths_onlydepth) _MAX_DEPTHr_INSUFFICIENT_DATA_MESSAGE_PY2ordr rr) encoded_datadata_lenpointerr/r0start first_octetr constructednum length_octettrailer contents_end length_octets_s rrrs6 zEFF E'A+3q(W:L6MMNN04#l7+,,w:OK qLG  C!#q(K by'A+% !;q(WBT>U!UVV04#l7+,,w:OC qLGd{sax !;<< 3JC 39 Cax1} 878 8'A+3q(W:L6MMNN153|G,-<;PL qLGGqA,"45 %s* 'M11 !;}hY`N`>a!abb } $G"^L=AXY`4ajo%ppL !PQQ"L\A--l1Z^i1i"(x\`hmnoho"p<\A--l1Z^i1i A L!Gh3|g7MxZaOa6bbcc&& 1    w ' c'l!: ;      rcfd}d}||dzz}||dzz}|dk\rF(C Ag "%.'&3,'' ]F }'&/! M $F+ '$\!2233, Mr)F)rFr)__doc__ __future__rrrrsys_typesrr r utilr r version_infor4r3r2rr$r&rrrrrOsX SR 00. 4[  .Bb$N4gT.r