Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Delta Between Two Patch Sets: Doc/library/ssl.rst

Issue 20421: expose SSL socket protocol version
Left Patch Set: Created 5 years, 9 months ago
Right Patch Set: Created 5 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/ssl.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 :mod:`ssl` --- TLS/SSL wrapper for socket objects 1 :mod:`ssl` --- TLS/SSL wrapper for socket objects
2 ================================================= 2 =================================================
3 3
4 .. module:: ssl 4 .. module:: ssl
5 :synopsis: TLS/SSL wrapper for socket objects 5 :synopsis: TLS/SSL wrapper for socket objects
6 6
7 .. moduleauthor:: Bill Janssen <bill.janssen@gmail.com> 7 .. moduleauthor:: Bill Janssen <bill.janssen@gmail.com>
8 .. sectionauthor:: Bill Janssen <bill.janssen@gmail.com> 8 .. sectionauthor:: Bill Janssen <bill.janssen@gmail.com>
9 9
10 10
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 The *cb_type* parameter allow selection of the desired channel binding 903 The *cb_type* parameter allow selection of the desired channel binding
904 type. Valid channel binding types are listed in the 904 type. Valid channel binding types are listed in the
905 :data:`CHANNEL_BINDING_TYPES` list. Currently only the 'tls-unique' channel 905 :data:`CHANNEL_BINDING_TYPES` list. Currently only the 'tls-unique' channel
906 binding, defined by :rfc:`5929`, is supported. :exc:`ValueError` will be 906 binding, defined by :rfc:`5929`, is supported. :exc:`ValueError` will be
907 raised if an unsupported channel binding type is requested. 907 raised if an unsupported channel binding type is requested.
908 908
909 .. versionadded:: 3.3 909 .. versionadded:: 3.3
910 910
911 .. method:: SSLSocket.selected_npn_protocol() 911 .. method:: SSLSocket.selected_npn_protocol()
912 912
913 Returns the protocol that was selected during the TLS/SSL handshake. If 913 Returns the higher-level protocol that was selected during the TLS/SSL
914 :meth:`SSLContext.set_npn_protocols` was not called, or if the other party 914 handshake. If :meth:`SSLContext.set_npn_protocols` was not called, or
915 does not support NPN, or if the handshake has not yet happened, this will 915 if the other party does not support NPN, or if the handshake has not yet
916 return ``None``. 916 happened, this will return ``None``.
917 917
918 .. versionadded:: 3.3 918 .. versionadded:: 3.3
919 919
920 .. method:: SSLSocket.unwrap() 920 .. method:: SSLSocket.unwrap()
921 921
922 Performs the SSL shutdown handshake, which removes the TLS layer from the 922 Performs the SSL shutdown handshake, which removes the TLS layer from the
923 underlying socket, and returns the underlying socket object. This can be 923 underlying socket, and returns the underlying socket object. This can be
924 used to go from encrypted operation over a connection to unencrypted. The 924 used to go from encrypted operation over a connection to unencrypted. The
925 returned socket should always be used for further communication with the 925 returned socket should always be used for further communication with the
926 other side of the connection, rather than the original socket. 926 other side of the connection, rather than the original socket.
927
928 .. method:: SSLSocket.version()
929
930 Return the actual SSL protocol version negotiated by the connection
931 as a string, or ``None`` is no secure connection is established.
932 As of this writing, possible return values include ``"SSLv2"``,
933 ``"SSLv3"``, ``"TLSv1"``, ``"TLSv1.1"`` and ``"TLSv1.2"``.
934 Recent OpenSSL versions may define more return values.
935
936 .. versionadded:: 3.5
927 937
928 .. attribute:: SSLSocket.context 938 .. attribute:: SSLSocket.context
929 939
930 The :class:`SSLContext` object this SSL socket is tied to. If the SSL 940 The :class:`SSLContext` object this SSL socket is tied to. If the SSL
931 socket was created using the top-level :func:`wrap_socket` function 941 socket was created using the top-level :func:`wrap_socket` function
932 (rather than :meth:`SSLContext.wrap_socket`), this is a custom context 942 (rather than :meth:`SSLContext.wrap_socket`), this is a custom context
933 object created for this SSL socket. 943 object created for this SSL socket.
934 944
935 .. versionadded:: 3.2 945 .. versionadded:: 3.2
936 946
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 Blake-Wilson et. al. 1790 Blake-Wilson et. al.
1781 1791
1782 `RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <http://ww w.ietf.org/rfc/rfc5246>`_ 1792 `RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <http://ww w.ietf.org/rfc/rfc5246>`_
1783 T. Dierks et. al. 1793 T. Dierks et. al.
1784 1794
1785 `RFC 6066: Transport Layer Security (TLS) Extensions <http://www.ietf.org/rfc /rfc6066>`_ 1795 `RFC 6066: Transport Layer Security (TLS) Extensions <http://www.ietf.org/rfc /rfc6066>`_
1786 D. Eastlake 1796 D. Eastlake
1787 1797
1788 `IANA TLS: Transport Layer Security (TLS) Parameters <http://www.iana.org/ass ignments/tls-parameters/tls-parameters.xml>`_ 1798 `IANA TLS: Transport Layer Security (TLS) Parameters <http://www.iana.org/ass ignments/tls-parameters/tls-parameters.xml>`_
1789 IANA 1799 IANA
LEFTRIGHT
« no previous file | Lib/ssl.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+