kr.motd.maven.sphinx.dist.urllib3.contrib.pyopenssl$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1? f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ b
SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested with 16.0.0)
* cryptography (minimum 1.3.4, from pyopenssl)
* idna (minimum 2.0, from cryptography)
However, pyopenssl depends on cryptography, which depends on idna, so while we
use all three directly here we end up having relatively few packages required.
You can install them with the following command:
pip install pyopenssl cryptography idna
To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::
try:
import urllib3.contrib.pyopenssl
urllib3.contrib.pyopenssl.inject_into_urllib3()
except ImportError:
pass
Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.
Activating this module also has the positive side effect of disabling SSL/TLS
compression in Python 2 (see `CRIME attack`_).
If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.
.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
__future__ java/lang/String absolute_import org/python/core/imp
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject;
! setlocal #
$ OpenSSL.SSL & importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject; ( )
* OpenSSL , cryptography . x509 0 $cryptography.hazmat.backends.openssl 2 backend 4 openssl_backend 6 )cryptography.hazmat.backends.openssl.x509 8 _Certificate : socket < timeout > error @ SocketError B io D BytesIO F _fileobject H org/python/core/Py J setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException; L M
K N ImportError P getname .(Ljava/lang/String;)Lorg/python/core/PyObject; R S
T org/python/core/PyException V match (Lorg/python/core/PyObject;)Z X Y
W Z None \ packages.backports.makefile ^ backport_makefile ` java/lang/Throwable b logging d ssl f packages h six j sys l n util p org/python/core/PyList r org/python/core/PyObject t inject_into_urllib3 v extract_from_urllib3 x ([Lorg/python/core/PyObject;)V z {
s | __all__ ~ True ? HAS_SNI ? org/python/core/PyDictionary ? PROTOCOL_SSLv23 ? __getattr__ ? S
u ? SSL ?
SSLv23_METHOD ? PROTOCOL_TLSv1 ? TLSv1_METHOD ?
? | _openssl_versions ? hasattr ? PROTOCOL_TLSv1_1 ? __call__ m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
u ? __nonzero__ ()Z ? ?
u ? TLSv1_1_METHOD ? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V ? ?
u ? PROTOCOL_TLSv1_2 ? TLSv1_2_METHOD ? update ? PROTOCOL_SSLv3 ? SSLv3_METHOD ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
u ? AttributeError ? CERT_NONE ? VERIFY_NONE ?
CERT_OPTIONAL ? VERIFY_PEER ?
CERT_REQUIRED ? VERIFY_FAIL_IF_NO_PEER_CERT ? _add 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
u ? _stdlib_to_openssl_verify ? dict ? org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? EmptyObjects [Lorg/python/core/PyObject; ? ? K ? f$1 getlocal (I)Lorg/python/core/PyObject; ? ?
? __iter__ ()Lorg/python/core/PyObject; ? ?
u ? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject; ? ?
K ? (ILorg/python/core/PyObject;)V # ?
? org/python/core/PyTuple ?
? | java/util/Arrays ? fill (([Ljava/lang/Object;Ljava/lang/Object;)V ? ?
? ? f_lasti I ? ? ? java/lang/Object ?
f_savedlocals [Ljava/lang/Object; ? ? ? getGeneratorInput ()Ljava/lang/Object; ? ?
? __iternext__ ? ?
u ? \ ? K ? urllib3/contrib/pyopenssl$py Lorg/python/core/PyCode; ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V z
? items 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; ?
u _openssl_to_stdlib_verify
newInteger (I)Lorg/python/core/PyInteger;
K SSL_WRITE_BLOCKSIZE orig_util_HAS_SNI ssl_
SSLContext orig_util_SSLContext getLogger __name__ log" inject_into_urllib3$2 7Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.% _validate_dependencies_met' getglobal) S
* PyOpenSSLContext, __setattr__.
u/ IS_PYOPENSSL1$ 3 extract_from_urllib3$3 4Undo monkey-patching by :func:`inject_into_urllib3`.6 False85 : _validate_dependencies_met$4 {
Verifies that PyOpenSSL's package-level dependencies have been met.
Throws `ImportError` if they are not met.
= cryptography.x509.extensions?
ExtensionsA getattrC get_extension_for_classE ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ?G
uH _isJ ?
uK X'cryptography' module missing required functionality. Try upgrading to v1.3.4 or newer.M
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;OP
KQ OpenSSL.cryptoS X509U _x509W S'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.Y< [ _dnsname_to_stdlib$5?
Converts a dNSName SubjectAlternativeName field to the form used by the
standard library on the given Python version.
Cryptography produces a dNSName as a unicode string that was idna-decoded
from ASCII bytes. We need to idna-encode that string to get it back, and
then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).
^
idna_encode$6 ?
Borrowed wholesale from the Python Cryptography Project. It turns out
that we can't just safely call `idna.encode`: it can explode for
wildcard names. This avoids that problem.
a idnac *.e org/python/core/PyUnicodeg /(Ljava/lang/String;)Lorg/python/core/PyUnicode; i
hj .l
startswithn lenp __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;rs
ut encodev asciix` z version_info| _ge~ ?
u decode? utf-8?] ? _dnsname_to_stdlib? get_subj_alt_name$7 U
Given an PyOpenSSL certificate, provides all the subject alternative names.
? to_cryptography?
extensions? SubjectAlternativeName? value? ExtensionNotFound? DuplicateExtension? UnsupportedExtension? UnsupportedGeneralNameType? UnicodeError?? ? W? warning? ?A problem was encountered with the certificate that prevented urllib3 from finding the SubjectAlternativeName field. This can affect certificate validation. The error was %s? ()V z?
s? append? get_values_for_type? DNSName? DNS? dellocal?
? extend? f$8
IP Address? str?? ? IPAddress?? ? get_subj_alt_name? object?
WrappedSocket? WrappedSocket$9
__module__? ?API-compatibility wrapper for Python OpenSSL's Connection-class.
Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
collector of pypy.
? __init__$10
connection? suppress_ragged_eofs? _makefile_refs? _closed?? ? __init__? fileno$11 fileno?? ? _decref_socketios$12 _gt? ?
u? _isub? ?
u? close?? ? _decref_socketios? recv$13 recv?
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;??
u? SysCallError? args? Unexpected EOF? _eq? ?
u? ZeroReturnError? get_shutdown? RECEIVED_SHUTDOWN? ()Lorg/python/core/PyException;O?
K
WantReadError
wait_for_read
gettimeout __not__ ?
u The read operation timed out?
recv_into$14 recv_into
settimeout$15
settimeout _send_until_done$16 send WantWriteError wait_for_write _send_until_done"
sendall$17 _iadd% ?
u& _lt( ?
u)$ + sendall- shutdown$18 shutdown0/ 2 close$19 Error54 7 getpeercert$20 get_peer_certificate: crypto< dump_certificate>
FILETYPE_ASN1@ subjectB
commonNameD get_subjectF CNH subjectAltNameJ9 L getpeercertN _reuse$21P Q _reuseS _drop$22U V _dropX getf_localsZ ?
[? ] makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;_`
Ka makefile$23 g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; ?d
uec g makefilei PyOpenSSLContext$24 ?
I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
for translating the interface of the standard library ``SSLContext`` object
to calls into PyOpenSSL.
l __init__$25 __getitem__o ?
up protocolr Contextt _ctxv _optionsx check_hostnamezn |
options$26~ property? options?
options$27 set_options?? ? setter? verify_mode$28 get_verify_mode?? ? verify_mode? verify_mode$29
set_verify? _verify_callback?? ? set_default_verify_paths$30 set_default_verify_paths?? ? set_ciphers$31
isinstance? text_type? set_cipher_list?? ? set_ciphers? load_verify_locations$32 _isnot? ?
u? load_verify_locations?? ? load_cert_chain$33 to_cell (II)V??
? use_certificate_file? getderef? ?
?
set_passwd_cb? f$34? ?
getclosure? ?
? k(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;[Lorg/python/core/PyObject;)V z?
?? use_privatekey_file?? ? load_cert_chain? wrap_socket$35
Connection? set_tlsext_host_name? set_connect_state? do_handshake? select timed out? SSLError? bad handshake: %r? _mod? ?
u?? ? wrap_socket?k ? _verify_callback$36? ? (Ljava/lang/String;)V org/python/core/PyFunctionTable?
?? self Lurllib3/contrib/pyopenssl$py;?? ? ? newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;??
K? ? _(x)? v? k? ? name idna_encode prefix peer_cert cert ext
e names _[221_8] _(225_8)? kwargs data rd wr
total_sent sent binary_form! mode# bufsize% ciphers' cafile) capath+ cadata- certfile/ keyfile1 password3
max_length5 prompt_twice7 userdata9 ; sock= server_side? do_handshake_on_connectA server_hostnameC cnxE err_noG err_depthI return_codeK getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V z?
RMN
T org/python/core/CodeLoaderV createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;XY
WZ runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V\]
K^ getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrapb )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;de
cf
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
j ?
l$
n5
p<