+/**
+ * gst_rtsp_server_set_tls_certificate:
+ * @server: a #GstRTSPServer
+ * @cert: (allow none): a #GTlsCertificate
+ *
+ * Set the TLS certificate for the server. Client connections will only
+ * be accepted when TLS is negotiated.
+ */
+void
+gst_rtsp_server_set_tls_certificate (GstRTSPServer * server,
+ GTlsCertificate * cert)
+{
+ GstRTSPServerPrivate *priv;
+ GTlsCertificate *old;
+
+ g_return_if_fail (GST_IS_RTSP_SERVER (server));
+
+ priv = server->priv;
+
+ if (cert)
+ g_object_ref (cert);
+
+ GST_RTSP_SERVER_LOCK (server);
+ old = priv->certificate;
+ priv->certificate = cert;
+ GST_RTSP_SERVER_UNLOCK (server);
+
+ if (old)
+ g_object_unref (old);
+}
+
+/**
+ * gst_rtsp_server_get_tls_certificate:
+ * @server: a #GstRTSPServer
+ *
+ * Get the #GTlsCertificate used for negotiating TLS @server.
+ *
+ * Returns: (transfer full): the #GTlsCertificate of @server. g_object_unref() after
+ * usage.
+ */
+GTlsCertificate *
+gst_rtsp_server_get_tls_certificate (GstRTSPServer * server)
+{
+ GstRTSPServerPrivate *priv;
+ GTlsCertificate *result;
+
+ g_return_val_if_fail (GST_IS_RTSP_SERVER (server), NULL);
+
+ priv = server->priv;
+
+ GST_RTSP_SERVER_LOCK (server);
+ if ((result = priv->certificate))
+ g_object_ref (result);
+ GST_RTSP_SERVER_UNLOCK (server);
+
+ return result;
+}