GNOME Bugzilla – Bug 532065
Implement RTSP Digest authentication
Last modified: 2008-05-08 16:58:10 UTC
RTSP only supports Basic or no authentication.
Created attachment 110554 [details] [review] implement RTSP Digest authentication This patch implements RTSP Digest authentication with a few limitations: - the algorithm is assumed to be MD5, - no qop support, - no support for the "stale" directive, which should be enough for the most common cases. The code is mostly based on libsoup's HTTP Digest auth support, with g_checksum (glib >= 2.16) replaced with a copy of the MD5 code from wavpack. Note that this patch touches gst-plugins-base (GstRTSPConnection) and gst-plugins-good (rtspsrc).
Patch by: Wouter Cloetens <zombie at e2big dot org> * gst-libs/gst/rtsp/Makefile.am: * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create), (md5_digest_to_hex_string), (auth_digest_compute_hex_urp), (auth_digest_compute_response), (add_auth_header), (gst_rtsp_connection_free), (gst_rtsp_connection_set_auth), (str_case_hash), (str_case_equal), (gst_rtsp_connection_set_auth_param), (gst_rtsp_connection_clear_auth_params): * gst-libs/gst/rtsp/gstrtspconnection.h: Add Digest authorization support for RTSP connections. See #532065. * gst-libs/gst/rtsp/md5.c: * gst-libs/gst/rtsp/md5.h: Yeap, another md5 implementation until we can depend on a glib that has support for it.
Based on patch by: Wouter Cloetens <wouter at mind be> * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_skip_lws), (gst_rtspsrc_unskip_lws), (gst_rtspsrc_skip_commas), (gst_rtspsrc_skip_item), (gst_rtsp_decode_quoted_string), (gst_rtspsrc_parse_digest_challenge), (gst_rtspsrc_parse_auth_hdr), (gst_rtspsrc_setup_auth): Support Digest authentication. Fixes #532065.