Skip to content

get_extra_info for ClientWebSocketResponse #1717

Closed
@kdub0

Description

I'd like to be able to retrieve the server's certificate from an https websocket. Right now, this is possible with something like:

async with aiohttp.ws_connect(url) as ws:
    cert = ws._conn.writer.get_extra_info('peercert')

Is there a way to do this that is future proof? or can the API be extended to expose the websocket's transport?

Thanks!

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions