Usage examples tls-interaction property for rtspsrc and souphttpsrc

Mandar Joshi emailmandar at gmail.com
Sat Oct 7 18:15:04 UTC 2017


> I did all those things I have no idea why it is not working
>
> Here is the full source

I overlooked certain things in my previous email.

For the tls-interaction to work in the way I am using it, you need to
have 2 more things on the server

1. You have to have on the server
gst_rtsp_auth_set_tls_authentication_mode(auth, G_TLS_AUTHENTICATION_REQUIRED);

2. You also have to have on the server, a callback for accepting
client's certificate. To do this,
g_signal_connect (auth, "accept-certificate", G_CALLBACK
(accept_certificate), NULL);


gboolean
accept_certificate (GstRTSPAuth         *auth,
                              GTlsConnection      *connection,
                              GTlsCertificate     *peer_cert,
                              GTlsCertificateFlags errors,
                              gpointer             user_data) {
   //return TRUE or FALSE here depending on peer_cert
   return TRUE;
}

I have just tested this with the code you posted and it works.
I'll upload a clean example on github soon.

Regards
Mandar Joshi


More information about the gstreamer-devel mailing list