Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review remarks applied
  • Loading branch information
matiuszka committed Sep 8, 2023
commit 1418dd109022cdff4432e332cffba4f19b143cb4
14 changes: 10 additions & 4 deletions Doc/library/ssl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1214,13 +1214,19 @@ SSL sockets also have the following additional methods and attributes:

.. method:: SSLSocket.get_verified_chain()
Comment thread
matiuszka marked this conversation as resolved.

Returns verified verified certificate chain provided by the other
end of the SSL channel. Return ``None`` if no certificates were provided.
Returns verified certificate chain provided by the other
end of the SSL channel as a list of ``_ssl.Certificate``.
Return ``None`` if no certificates were provided.

.. versionadded:: 3.13

.. method:: SSLSocket.get_unverified_chain()

Returns unverified verified certificate chain provided by the other
end of the SSL channel. Return ``None`` if no certificates were provided.
Returns unverified certificate chain provided by the other
Comment thread
gpshead marked this conversation as resolved.
Outdated
end of the SSL channel as a list of ``_ssl.Certificate``.
Return ``None`` if no certificates were provided.

.. versionadded:: 3.13

.. method:: SSLSocket.cipher()

Expand Down
14 changes: 6 additions & 8 deletions Lib/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,18 +877,16 @@ def getpeercert(self, binary_form=False):
return self._sslobj.getpeercert(binary_form)

def get_verified_chain(self):
"""Returns verified verified certificate chain provided by the other
end of the SSL channel.

Return None if no certificates were provided.
"""Returns verified certificate chain provided by the other
end of the SSL channel as a list of ``_ssl.Certificate``.
Comment thread
gpshead marked this conversation as resolved.
Outdated
Return ``None`` if no certificates were provided.
Comment thread
gpshead marked this conversation as resolved.
Outdated
"""
return self._sslobj.get_verified_chain()

def get_unverified_chain(self):
"""Returns unverified verified certificate chain provided by the other
end of the SSL channel.

Return None if no certificates were provided.
"""Returns unverified certificate chain provided by the other
end of the SSL channel as a list of ``_ssl.Certificate``.
Return ``None`` if no certificates were provided.
"""
return self._sslobj.get_unverified_chain()

Expand Down