Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python、nodejs、c++ quic client Handshake error #1272

Open
xtuyaowu opened this issue Jul 2, 2022 · 1 comment
Open

python、nodejs、c++ quic client Handshake error #1272

xtuyaowu opened this issue Jul 2, 2022 · 1 comment

Comments

@xtuyaowu
Copy link

xtuyaowu commented Jul 2, 2022

hi:
try to use python、nodejs、c++ as quic client connect to quiche server but got Handshake error
https://github.com/nodejs/quic
https://github.com/aiortc/aioquic
https://github.com/lucas-clemente/quic-go
those project Handshake is TLS 1.3

can both client and server side ignore certificate check ??

thanks

@ljluestc
Copy link

from aioquic.asyncio import connect
from aioquic.asyncio.client import QuicConnection
from aioquic.asyncio.protocol import QuicConnectionProtocol
from aioquic.asyncio.transport import QuicTransport
from aioquic.asyncio.ssl import ClientContext
from aioquic.asyncio.ssl import ClientContext

class MyClientProtocol(QuicConnectionProtocol):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.transport = None

async def main():
    # Create a context with no certificate validation
    context = ClientContext()
    context.check_hostname = False
    context.verify_mode = ssl.CERT_NONE

    # Connect to the server
    async with connect('localhost', 4433, ssl_context=context, create_protocol=MyClientProtocol) as transport:
        # Interact with the server
        pass

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants