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

Client not receiving or responding to Hello Verify Request #8

Open
albion-packet-hooking opened this issue Apr 29, 2021 · 3 comments
Open

Comments

@albion-packet-hooking
Copy link

I've used your sample code and the various test files found within the project but I can't get any of them to get past the server responding to the Client Hello. I've tried it on Python 3.6 and 3.8.

Any insight or work being done on this project at the moment? Just checking before I dive into trying to understand it and see if I can fix it.

CLIENT:

DEBUG:dtls.util:Allocating BIO: 1820701169296
DEBUG:dtls.sslconnection:Allocating SSL CTX: 1820745966944
DEBUG:dtls.sslconnection:Allocating SSL: 1820747085472
DEBUG:dtls.sslconnection:Initiating handshake...
DEBUG:dtls.sslconnection:SSL_handshake_start:b'before SSL initialization':1
DEBUG:dtls.sslconnection:SSL_connect_loop:b'before SSL initialization':1
DEBUG:dtls.sslconnection:SSL_connect_loop:b'SSLv3/TLS write client hello':1

SERVER:

DEBUG:dtls.util:Allocating BIO: 1750033871312
DEBUG:dtls.demux.router:Created new connection for address: None
DEBUG:dtls.sslconnection:!!! _init_server where rsock != self._sock !!!
DEBUG:dtls.util:Allocating BIO: 1750033869520
DEBUG:dtls.sslconnection:Allocating SSL CTX: 1750034613648
DEBUG:dtls.sslconnection:Allocating SSL: 1750033101440
DEBUG:dtls.demux.router:Received datagram from peer: ('127.0.0.1', 59892)
DEBUG:dtls.demux.router:Forwarding datagram from peer: ('127.0.0.1', 59892), default: True
DEBUG:dtls.sslconnection:Invoking DTLSv1_listen for ssl: 1750033101440
DEBUG:dtls.sslconnection:Get cookie for ssl: 1750033101440
DEBUG:dtls.openssl:Returning cookie: [224, 101, 153, 246, 52, 25, 255, 182, 60, 229, 57, 105, 64, 149, 245, 249]

image

Here is the output from running echo_seq

C:\Python36\python.exe -m dtls.test.echo_seq
DEBUG:dtls.util:Allocating BIO: 1724623979104
DEBUG:dtls.demux.router:Created new connection for address: None
DEBUG:dtls.sslconnection:!!! _init_server where rsock != self._sock !!!
DEBUG:dtls.util:Allocating BIO: 1724623982048
DEBUG:dtls.sslconnection:Allocating SSL CTX: 1724623982624
DEBUG:dtls.sslconnection:Allocating SSL: 1724623983632
Listen invocation: 1
DEBUG:dtls.demux.router:Received datagram from peer: ('127.0.0.1', 62609)
DEBUG:dtls.demux.router:Forwarding datagram from peer: ('127.0.0.1', 62609), default: True
DEBUG:dtls.sslconnection:Invoking DTLSv1_listen for ssl: 1724623983632
DEBUG:dtls.sslconnection:Get cookie for ssl: 1724623983632
DEBUG:dtls.openssl:Returning cookie: [123, 230, 123, 157, 25, 190, 222, 179, 32, 144, 82, 51, 122, 65, 112, 227]
@albion-packet-hooking
Copy link
Author

albion-packet-hooking commented Apr 29, 2021

Just saw something weird. A client hello gets sent on a port, then another gets sent, the server sees the second one and responds to that port and the real client never gets it. Guessing that is the demux which is forwarding the packet.
image

@albion-packet-hooking
Copy link
Author

albion-packet-hooking commented Apr 29, 2021

Seems like some kind of problem with this router and write BIO linkage or something.

I neutered the SSLConnection class down to just the basics and managed to connect and receive/send data.

Should note that the server still isn't able to send. Getting a peer unreachable.

@sarain
Copy link

sarain commented Nov 9, 2021

Just chiming in that I'm also experiencing this problem. I haven't dug quite as deep as you have here but the symptoms match, with it getting hung after DEBUG:dtls.openssl:Returning cookie: on the server side. Just using the client example in the readme so far and don't have debug log prints there but it also hangs.

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