/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__/pem.cpython-312.pyc (7112B)
M jdZddlmZmZmZmZddlZddlZddlZddl m Z ddl m Z mZmZej dkrddlmZndd lmZd Zdd Zd Zdd Zy)zq Encoding DER to PEM and decoding PEM to DER. Exports the following items: - armor() - detect() - unarmor() )unicode_literalsdivisionabsolute_importprint_functionN)unwrap) type_namestr_clsbyte_cls))StringIO)BytesIOct|tsttdt ||j ddk7xs|j ddk7S)z Detect if a byte string seems to contain a PEM-encoded block :param byte_string: A byte string to look through :return: A boolean, indicating if a PEM-encoded block is contained in the byte string zC byte_string must be a byte string, not %s s -----BEGINs ---- BEGIN) isinstancer TypeErrorr _type_namefind) byte_strings ?/opt/nydus/tmp/pip-target-a90h98xg/lib/python/asn1crypto/pem.pydetectrs_ k8 ,  { #       M *b 0 YK4D4D]4SWY4YYct|ts ttdt |zt|t sttdt ||j jd}t}|jd|j||jd|r}|D]g}|j|jd|jd|j||jd|jdi|jdtj|}t|}d}||kr3|j|||d z|jd|d z }||kr3|jd |j||jd|jS) a  Armors a DER-encoded byte string in PEM :param type_name: A unicode string that will be capitalized and placed in the header and footer of the block. E.g. "CERTIFICATE", "PRIVATE KEY", etc. This will appear as "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----". :param der_bytes: A byte string to be armored :param headers: An OrderedDict of the header lines to write after the BEGIN line :return: A byte string of the PEM block zA der_bytes must be a byte string, not %s zD type_name must be a unicode string, not %s asciis -----BEGIN s----- s:  r@s -----END )rr rrrr upperencoderwritebase64 b64encodelengetvalue)r der_bytesheadersoutputkey b64_bytesb64_lenis rarmorr+2s( i * Y' (   i )  y !    !((1I YF LL  LL LLC LLG, - LL  LL,,W5 6 LL    U  +I)nG A g+ YqR() U R g+ LL LL LL ?? rc#Kt|tsttdt |d}i}d}d}d}d}|j dD]}|dk(r |dk(r>t jd|}|s'|jdjd}d }d }L|d k(rQ|jd d k(rd }n:|jd} | jdd\} } | j|| <|d k(s|dddvr'tj|} ||| fd}i}d}d}d }||z }|r|sttdyw)ax Convert a PEM-encoded byte string into one or more DER-encoded byte strings :param pem_bytes: A byte string of the PEM-encoded data :raises: ValueError - when the pem_bytes do not appear to be PEM-encoded bytes :return: A generator of 3-element tuples in the format: (object_type, headers, der_bytes). The object_type is a unicode string of what is between "-----BEGIN " and "-----". Examples include: "CERTIFICATE", "PUBLIC KEY", "PRIVATE KEY". The headers is a dict containing any lines in the form "Name: Value" that are right after the begin line. zA pem_bytes must be a byte string, not %s trashrNFs1^(?:---- |-----)BEGIN ([A-Z0-9 ]+)(?: ----|-----)rrTr%:rbody:r)s-----s---- z| pem_bytes does not appear to contain PEM-encoded data - no BEGIN/END combination found )rr rrr splitlinesrematchgroupdecodersplitstripr b64decode ValueError) pem_bytesstater% base64_data object_type found_start found_endlinetype_name_match decoded_linenamevaluer$s r_unarmorrFps$ i *  y !     EGKKKI$$U+ 3;  G !hh'[]abO")//299'BKKE  I yy"$#{{73 *00a8 e %   F?Aay00",,[9 "GY77! "   4 KM,P i    (s C3E6AEc6t|}|s t|S|S)a Convert a PEM-encoded byte string into a DER-encoded byte string :param pem_bytes: A byte string of the PEM-encoded data :param multiple: If True, function will return a generator :raises: ValueError - when the pem_bytes do not appear to be PEM-encoded bytes :return: A 3-element tuple (object_name, headers, der_bytes). The object_name is a unicode string of what is between "-----BEGIN " and "-----". Examples include: "CERTIFICATE", "PUBLIC KEY", "PRIVATE KEY". The headers is a dict containing any lines in the form "Name: Value" that are right after the begin line. )rFnext)r;multiple generators runarmorrKs!*#I I r)N)F)__doc__ __future__rrrrr r3sys_errorsr_typesr rr r version_info cStringIOr riorr+rFrKrrrUsQSR >>d-Z.;|Q hr