You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are not able to get peer certificate when ClientResponseError is raised.
Describe the solution you'd like
try:
async with aiohttp.ClientSession(
timeout=aiohttp.ClientTimeout(total=60.0),
request_class=Latin1HeadersClientRequest,
) as session:
...
except aiohttp.ClientResponseError as e:
sslobj = e.connection.transport.get_extra_info("ssl_object") # <-- LIKE THIS
Describe alternatives you've considered
No alternative found
Related component
Client
Additional context
We need to perform advanced certificate validation for all response codes.