diff --git a/examples/http3_client.py b/examples/http3_client.py index 8c29b982..fd071aac 100644 --- a/examples/http3_client.py +++ b/examples/http3_client.py @@ -437,6 +437,11 @@ async def main( parser.add_argument( "--ca-certs", type=str, help="load CA certificates from the specified file" ) + parser.add_argument( + "--certificate", + type=str, + help="load the TLS certificate from the specified file", + ) parser.add_argument( "--cipher-suites", type=str, @@ -482,6 +487,11 @@ async def main( type=str, help="write downloaded files to this directory", ) + parser.add_argument( + "--private-key", + type=str, + help="load the TLS private key from the specified file", + ) parser.add_argument( "-q", "--quic-log", @@ -559,6 +569,10 @@ async def main( except FileNotFoundError: pass + # load SSL certificate and key + if args.certificate is not None: + configuration.load_cert_chain(args.certificate, args.private_key) + if uvloop is not None: uvloop.install() asyncio.run(