Gstreamer: How to do streaming through TLS?

In "gst-rtsp-server / examples / test-video.c", it seems you can configure the TLS certificate and start the rtsp server. I wonder how this will work on the client side, including, for example, command-line options and certificate authority, etc. Thanks for the tutorial.

The following is additional information after some attempt, where the most important error that I think of is "Peer failed to execute TLS handshake."

server side

$ gst-rtsp-server/examples/test-video 

client side

 $ GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsps://127.0.0.1:8554/test protocols=tls ! rtph264depay ! avdec_h264 ! xvimagesink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Progress: (open) Opening Stream Progress: (connect) Connecting to rtsps://127.0.0.1:8554/test 0:00:00.055578735 12767 0xa51230 ERROR default gstrtspconnection.c:698:gst_rtsp_connection_connect: failed to connect: Peer failed to perform TLS handshake 0:00:00.055643339 12767 0xa51230 ERROR rtspsrc gstrtspsrc.c:3677:gst_rtsp_conninfo_connect:<rtspsrc0> Could not connect to server. (Generic error) 0:00:00.055679389 12767 0xa51230 WARN rtspsrc gstrtspsrc.c:6148:gst_rtspsrc_retrieve_sdp:<rtspsrc0> error: Failed to connect. (Generic error) 0:00:00.055764506 12767 0xa51230 WARN rtspsrc gstrtspsrc.c:6227:gst_rtspsrc_open:<rtspsrc0> can't get sdp 0:00:00.055793412 12767 0xa51230 WARN rtspsrc gstrtspsrc.c:4525:gst_rtspsrc_loop:<rtspsrc0> we are not connected ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing. Additional debug info: gstrtspsrc.c(6148): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Failed to connect. (Generic error) ERROR: pipeline doesn't want to preroll. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... 
+6
source share

Source: https://habr.com/ru/post/955808/


All Articles