• Home
  • Raw
  • Download

Lines Matching refs:SSLContext

54 For more sophisticated applications, the :class:`ssl.SSLContext` class
56 by SSL sockets created through the :meth:`SSLContext.wrap_socket` method.
141 Python 2.7.9, it can be more flexible to use :meth:`SSLContext.wrap_socket`
240 A convenience function helps create :class:`SSLContext` objects for common
245 Return a new :class:`SSLContext` object with default settings for
248 :class:`SSLContext` constructor directly.
252 :meth:`SSLContext.load_verify_locations`. If all three are
259 as *purpose* sets :data:`~SSLContext.verify_mode` to :data:`CERT_REQUIRED`
261 *cadata* is given) or uses :meth:`SSLContext.load_default_certs` to load
270 :class:`SSLContext` and apply the settings yourself.
274 with a :class:`SSLContext` created by this function that they get an error
462 :meth:`SSLContext.set_default_verify_paths`. The return value is a
521 Possible value for :attr:`SSLContext.verify_mode`, or the ``cert_reqs``
531 Possible value for :attr:`SSLContext.verify_mode`, or the ``cert_reqs``
538 be passed, either to :meth:`SSLContext.load_verify_locations` or as a
543 Possible value for :attr:`SSLContext.verify_mode`, or the ``cert_reqs``
549 be passed, either to :meth:`SSLContext.load_verify_locations` or as a
554 Possible value for :attr:`SSLContext.verify_flags`. In this mode, certificate
562 Possible value for :attr:`SSLContext.verify_flags`. In this mode, only the
566 :attr:`SSLContext.load_verify_locations`, validation will fail.
572 Possible value for :attr:`SSLContext.verify_flags`. In this mode, CRLs of
579 Possible value for :attr:`SSLContext.verify_flags` to disable workarounds
586 Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to
786 you can use the :meth:`SSLContext.set_npn_protocols` method to advertise
843 :meth:`SSLContext.set_servername_callback`.
850 :meth:`SSLContext.load_default_certs`. This value indicates that the
859 :meth:`SSLContext.load_default_certs`. This value indicates that the
902 :attr:`~SSLContext.check_hostname` attribute of the socket's
1001 :meth:`SSLContext.set_alpn_protocols` was not called, if the other party does
1011 handshake. If :meth:`SSLContext.set_npn_protocols` was not called, or
1037 The :class:`SSLContext` object this SSL socket is tied to. If the SSL
1039 (rather than :meth:`SSLContext.wrap_socket`), this is a custom context
1055 .. class:: SSLContext(protocol)
1067 :class:`SSLContext` objects have the following methods and attributes:
1069 .. method:: SSLContext.cert_store_stats()
1081 .. method:: SSLContext.load_cert_chain(certfile, keyfile=None, password=None)
1108 .. method:: SSLContext.load_default_certs(purpose=Purpose.SERVER_AUTH)
1113 :meth:`SSLContext.set_default_verify_paths`. In the future the method may
1122 .. method:: SSLContext.load_verify_locations(cafile=None, capath=None, cadata=None)
1129 DER format. In order to make use of CRLs, :attr:`SSLContext.verify_flags`
1147 .. method:: SSLContext.get_ca_certs(binary_form=False)
1160 .. method:: SSLContext.set_default_verify_paths()
1169 .. method:: SSLContext.set_ciphers(ciphers)
1182 .. method:: SSLContext.set_alpn_protocols(protocols)
1200 .. method:: SSLContext.set_npn_protocols(protocols)
1213 .. method:: SSLContext.set_servername_callback(server_name_callback)
1220 Only one callback can be set per ``SSLContext``. If *server_name_callback*
1228 and the third argument is the original :class:`SSLContext`. The server name
1233 :class:`SSLContext` representing a certificate chain that matches the server
1261 .. method:: SSLContext.load_dh_params(dhfile)
1272 .. method:: SSLContext.set_ecdh_curve(curve_name)
1289 .. method:: SSLContext.wrap_socket(sock, server_side=False, \
1312 .. method:: SSLContext.session_stats()
1324 .. attribute:: SSLContext.check_hostname
1328 :attr:`~SSLContext.verify_mode` must be set to :data:`CERT_OPTIONAL` or
1330 :meth:`~SSLContext.wrap_socket` in order to match the hostname.
1336 context = ssl.SSLContext(ssl.PROTOCOL_TLS)
1349 .. attribute:: SSLContext.options
1360 .. attribute:: SSLContext.protocol
1365 .. attribute:: SSLContext.verify_flags
1372 .. attribute:: SSLContext.verify_mode
1458 be used by calling :meth:`SSLContext.load_default_certs`, this is done
1465 case, only the ``certfile`` parameter to :meth:`SSLContext.load_cert_chain`
1542 >>> context = ssl.SSLContext(ssl.PROTOCOL_TLS)
1652 new socket from the other end, and use the context's :meth:`SSLContext.wrap_socket`
1738 :meth:`SSLContext.load_cert_chain`.
1740 By contrast, if you create the SSL context by calling the :class:`SSLContext`
1751 When calling the :class:`SSLContext` constructor directly,
1761 check is automatically performed when :attr:`SSLContext.check_hostname` is
1780 disable SSLv2 and SSLv3 explicitly using the :data:`SSLContext.options`
1783 context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
1795 :meth:`SSLContext.set_ciphers` method. Starting from Python 2.7.9, the
1824 :meth:`SSLContext.set_npn_protocols` and
1826 * :meth:`SSLContext.set_default_verify_paths` ignores the env vars