Skip to content

Commit

Permalink
Add ClientResponse.certificate and populate it, if appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
auxsvr committed Jan 23, 2023
1 parent 4635161 commit f2aa134
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiohttp/client_reqrep.py
Expand Up @@ -698,6 +698,7 @@ def __init__(

self.method = method
self.cookies: SimpleCookie[str] = SimpleCookie()
self.certficate: Optional[Dict[str, Union[tuple, int, str]]] = None

self._real_url = url
self._url = url.with_fragment(None)
Expand Down Expand Up @@ -887,6 +888,7 @@ def _response_eof(self) -> None:
return

if self._connection is not None:
self.certificate = self._connection.transport.get_extra_info("peercert")
# websocket, protocol could be None because
# connection could be detached
if (
Expand Down

0 comments on commit f2aa134

Please sign in to comment.