[FFmpeg-devel] [PATCH] Add support for digest auth in the http and rtsp protocols

Martin Storsjö martin
Tue Mar 23 17:36:41 CET 2010


Hi,

On Tue, 23 Mar 2010, Ronald S. Bultje wrote:

> On Tue, Mar 23, 2010 at 4:31 AM, Martin Storsj? <martin at martin.st> wrote:
> > Hmm, I can't seem to find any examples of including multiple methods in
> > the same WWW-Auth (although the RFC mentions it). If I understand the RFC
> > correctly, both the individual challenges in the WWW-Auth header and the
> > parameters within a single challenge are comma-separated, with no clear
> > way of knowing in advance what the next token is. Parsing that would suck
> > royally...
> >
> > If I understand this correctly, does it look something like this then?
> >
> > WWW-Authenticate: Basic realm="WallyWorld", Digest
> > realm="testrealm at host.com", qop="auth,auth-int",
> > nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
> > opaque="5ccc069c403ebaf9f0171e9517f40e41"
> 
> It's hard to say. I can't find them in the wild either, which surprises me.
> 
> Let's focus for now on the case where multiple auth schemes are
> provided on separate lines, that's easier (and I'm unsure if your
> earlier patch handled that already.) It should pick the safest
> possible, so currently digest over basic.
> 
> Once that works for HTTP, I'll go over the RTSP patches (should be
> straightforward).

Added support for this now.

Also, I fixed the av_stristart usage, checking for "Basic " or "Digest ", 
to fix cases if new methods start with the same string. Is this ok, or 
should I be even more pedantic and just check that the following char is 
whitespace? The RFC doesn't seem to specify any particular delimiter at 
all here.

Also added support for picking the best supported qop type if it happens 
to include more than one option.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Split-out-http-authentication-handling-into-a-separa.patch
Type: text/x-diff
Size: 10434 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100323/756c316b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-support-for-http-digest-authentication.patch
Type: text/x-diff
Size: 11578 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100323/756c316b/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Make-ff_rtsp_send_cmd-simply-call-ff_rtsp_send_cmd_w.patch
Type: text/x-diff
Size: 904 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100323/756c316b/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Make-the-RTSP-code-use-the-separate-http-authenticat.patch
Type: text/x-diff
Size: 7927 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100323/756c316b/attachment-0003.patch>



More information about the ffmpeg-devel mailing list