Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
pip._vendor.urllib3.contrib.securetransport.WrappedSocket Class Reference
Inheritance diagram for pip._vendor.urllib3.contrib.securetransport.WrappedSocket:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.urllib3.contrib.securetransport.WrappedSocket:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, socket)
 
 handshake (self, server_hostname, verify, trust_bundle, min_version, max_version, client_cert, client_key, client_key_passphrase, alpn_protocols)
 
 fileno (self)
 
 recv (self, bufsiz)
 
 recv_into (self, buffer, nbytes=None)
 
 settimeout (self, timeout)
 
 gettimeout (self)
 
 send (self, data)
 
 sendall (self, data)
 
 shutdown (self)
 
 close (self)
 
 getpeercert (self, binary_form=False)
 
 version (self)
 

Public Attributes

 socket
 
 context
 

Protected Member Functions

 _raise_on_error (self)
 
 _set_ciphers (self)
 
 _set_alpn_protocols (self, protocols)
 
 _custom_validate (self, verify, trust_bundle)
 
 _evaluate_trust (self, trust_bundle)
 
 _decref_socketios (self)
 
 _reuse (self)
 
 _drop (self)
 

Protected Attributes

 _makefile_refs
 
 _closed
 
 _exception
 
 _keychain
 
 _keychain_dir
 
 _client_cert_chain
 
 _timeout
 

Detailed Description

API-compatibility wrapper for Python's OpenSSL wrapped socket object.

Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
collector of PyPy.

Member Function Documentation

◆ _custom_validate()

pip._vendor.urllib3.contrib.securetransport.WrappedSocket._custom_validate (   self,
  verify,
  trust_bundle 
)
protected
Called when we have set custom validation. We do this in two cases:
first, when cert validation is entirely disabled; and second, when
using a custom trust DB.
Raises an SSLError if the connection is not trusted.

◆ _raise_on_error()

pip._vendor.urllib3.contrib.securetransport.WrappedSocket._raise_on_error (   self)
protected
A context manager that can be used to wrap calls that do I/O from
SecureTransport. If any of the I/O callbacks hit an exception, this
context manager will correctly propagate the exception after the fact.
This avoids silently swallowing those exceptions.

It also correctly forces the socket closed.

◆ _set_alpn_protocols()

pip._vendor.urllib3.contrib.securetransport.WrappedSocket._set_alpn_protocols (   self,
  protocols 
)
protected
Sets up the ALPN protocols on the context.

◆ _set_ciphers()

pip._vendor.urllib3.contrib.securetransport.WrappedSocket._set_ciphers (   self)
protected
Sets up the allowed ciphers. By default this matches the set in
util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
custom and doesn't allow changing at this time, mostly because parsing
OpenSSL cipher strings is going to be a freaking nightmare.

◆ handshake()

pip._vendor.urllib3.contrib.securetransport.WrappedSocket.handshake (   self,
  server_hostname,
  verify,
  trust_bundle,
  min_version,
  max_version,
  client_cert,
  client_key,
  client_key_passphrase,
  alpn_protocols 
)
Actually performs the TLS handshake. This is run automatically by
wrapped socket, and shouldn't be needed in user code.

The documentation for this class was generated from the following file: