ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/OpenSSL/__pycache__/_util.cpython-36.opt-1.pyc
3

F\N@sddlZddlZddlmZmZmZddlmZeZej	ej
Z
ejZe
jddZ
ddZdd	Zd
dZdd
ZddZerddZnddZeZejdZddZdS)N)PY3binary_type	text_type)BindingF)Zshould_clear_after_alloccCs|sdSttj|S)z
    Get a native string type representing of the given CFFI ``char*`` object.

    :param charp: A C-style string represented using CFFI.

    :return: :class:`str`
    )nativeffistring)Zcharpr
/usr/lib/python3.6/_util.pytextsrcCsVg}xDtj}|dkrP|jttj|ttj|ttj|fqW||dS)ac
    Convert an OpenSSL library failure into a Python exception.

    When a call to the native OpenSSL library fails, this is usually signalled
    by the return value, and an error code is stored in an error queue
    associated with the current thread. The err library provides functions to
    obtain these error codes and textual error messages.
    rN)libZ
ERR_get_errorappendrZERR_lib_error_stringZERR_func_error_stringZERR_reason_error_string)Zexception_typeerrorserrorr
r
rexception_from_error_queue"s	rcsfdd}|S)z~
    Create an assert function that uses :func:`exception_from_error_queue` to
    raise an exception wrapped by *error*.
    cs|dk	rtdS)zT
        If *ok* is not True, retrieve the error from OpenSSL and raise it.
        TN)r)ok)rr
ropenssl_assert>sz#make_assert.<locals>.openssl_assertr
)rrr
)rrmake_assert9srcCsLt|ttfstd|tr4t|trH|jdSnt|trH|jdS|S)a6
    Convert :py:class:`bytes` or :py:class:`unicode` to the native
    :py:class:`str` type, using UTF-8 encoding if conversion is necessary.

    :raise UnicodeError: The input string is not UTF-8 decodeable.

    :raise TypeError: The input is neither :py:class:`bytes` nor
        :py:class:`unicode`.
    z%r is neither bytes nor unicodezutf-8)
isinstancerr	TypeErrorrdecodeencode)sr
r
rrHs



rcCs2t|tr|St|tr&|jtjStddS)a
    Convert a Python string to a :py:class:`bytes` string identifying the same
    path and which can be passed into an OpenSSL API accepting a filename.

    :param s: An instance of :py:class:`bytes` or :py:class:`unicode`.

    :return: An instance of :py:class:`bytes`.
    z3Path must be represented as bytes or unicode stringN)rrrrsysgetfilesystemencodingr)rr
r
rpath_string]s
	

rcCs
|jdS)Ncharmap)r)rr
r
rbyte_stringosrcCs|S)Nr
)rr
r
rrrsz) for {0} is no longer accepted, use bytescCs.t|tr*tjtj|tdd|jdS|S)a
    If ``obj`` is text, emit a warning that it should be bytes instead and try
    to convert it to bytes automatically.

    :param str label: The name of the parameter from which ``obj`` was taken
        (so a developer can easily find the source of the problem and correct
        it).

    :return: If ``obj`` is the text string type, a ``bytes`` object giving the
        UTF-8 encoding of that text is returned.  Otherwise, ``obj`` itself is
        returned.
    )category
stacklevelzutf-8)rrwarningswarn
_TEXT_WARNINGformatDeprecationWarningr)Zlabelobjr
r
rtext_to_bytes_and_warns

r()rr"ZsixrrrZ,cryptography.hazmat.bindings.openssl.bindingrZbindingZinit_static_locksrr
Z
new_allocatorZno_zero_allocatorrrrrrrobjectZUNSPECIFIED__name__r$r(r
r
r
r<module>s&