Possibility to get peer certificate when ClientResponseError is raised
- 主要言語
- Python
- スター
- 16.5k
- フォーク
- 2.4k
- 平均マージ
- 17時間 22分
- マージ済み PR(30日)
- 212
説明
### Is your feature request related to a problem?
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.
### Code of Conduct
- [X] I agree to follow the aio-libs Code of Conduct
コントリビューションガイド
評価
この issue はまだ評価されていません。