aiortc / aioquic

QUIC and HTTP/3 implementation in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

examples/http3_client.py: support to send client certificate to server?

lastpepole opened this issue · comments

if you just load the certificate in the QUIC config in the usual way, it should use it if asked by the server.

@rthalley how to load client certificate with examples/http3_client.py?

examples/http3_client.py doesn't have command line support for it, but if you look at examples/http3_server.py and take this line:

    # load SSL certificate and key
    configuration.load_cert_chain(args.certificate, args.private_key)

That's how you do it.

To add this to the client you'd need the parser.add_argument() calls for -c and -k from the server code, though you can remove required=True as they are optional in the client. Since they are optional, you should only call load_cert_chain() if they are both not empty.

I'd be willing to add some command line arguments to the client, but could you please indicate a server against which we can test this?