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

TLS support in V4l2rtspserver #341

Open
manivalaguru opened this issue Aug 8, 2024 · 5 comments
Open

TLS support in V4l2rtspserver #341

manivalaguru opened this issue Aug 8, 2024 · 5 comments

Comments

@manivalaguru
Copy link

manivalaguru commented Aug 8, 2024

Hi,
I'm working on enabling streaming with TLS, but I'm encountering issues with the proper initialization.

OS:ubuntu 22.04
server pipeline:
sudo ./v4l2rtspserver /dev/video0 -fMJPG -W1920 -H1080 -P443 -F60 -u routecam -x server.includesprivatekey.pem

client pipeline:
gst-launch-1.0 rtspsrc location=rtsps://192.168.1.126:443/routecam tls-validation-flags=generic-error protocols=tls latency=0 ! rtpjpegdepay ! jpegdec ! videoconvert ! fpsdisplaysink

While debugging, we identified that the issue occurs because the fTLS.tlsAcceptIsNeeded flag is being set to True even after it has been set to False following the SSL acceptance in the call acceptResult = fInputTLS->accept(fOurSocket);.

The following functions are repeatedly setting the flag. Could you clarify why this function is being called multiple times? what could be the reason
GenericMediaServer::ClientConnection
::ClientConnection(GenericMediaServer& ourServer,
int clientSocket, struct sockaddr_storage const& clientAddr,
Boolean useTLS)

On the client side, this issue keeps recurring.
Progress: (open) Retrieving media info
Progress: (connect) Connecting to rtsps://192.168.1.126:443/routecam

I have attached the client-side log and the Wireshark log to help you better understand the issue.
tls_failre.zip

Regards,
Manikandan

@mpromonet
Copy link
Owner

Hi @manivalaguru

Did the file contain private keys and certificate ?

Best Regards
Michel

@manivalaguru
Copy link
Author

Yes,The attached file, server.includesprivatekey.pem, is a valid TLS certificate containing both the private key and certificate. Could you provide a step-by-step guide on how to test TLS connectivity using this certificate?
key_cert.zip

@manivalaguru
Copy link
Author

Any inputs?

@mpromonet
Copy link
Owner

mpromonet commented Aug 13, 2024

Hi @manivalaguru
Gdb, strace, valgrind.
By the way using vlc that is also based on live555 might be a better option than gstreamer.
Best Regards
Michel

@mpromonet
Copy link
Owner

Hi @manivalaguru
I proposed a modification in VLC https://code.videolan.org/videolan/vlc/-/merge_requests/6050 to allow to connect to RTSPS.
Best Regards,
Michel.

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