diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-25 13:58:26 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-25 13:58:26 +0000 |
commit | 855e7732c6bcc7d52cd0863407a721c2bf00fcf1 (patch) | |
tree | 1c3adc0788d06221ab5a06bd33b9dc7716577ba2 /libavformat/httpauth.h | |
parent | d8f9295753f3ff9424bfde8907b9e865d46a8231 (diff) | |
download | ffmpeg-855e7732c6bcc7d52cd0863407a721c2bf00fcf1.tar.gz |
Add support for http digest authentication
Originally committed as revision 22667 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/httpauth.h')
-rw-r--r-- | libavformat/httpauth.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavformat/httpauth.h b/libavformat/httpauth.h index 47d11af51a..ebab3fca29 100644 --- a/libavformat/httpauth.h +++ b/libavformat/httpauth.h @@ -29,8 +29,22 @@ typedef enum HTTPAuthType { HTTP_AUTH_NONE = 0, /**< No authentication specified */ HTTP_AUTH_BASIC, /**< HTTP 1.0 Basic auth from RFC 1945 * (also in RFC 2617) */ + HTTP_AUTH_DIGEST, /**< HTTP 1.1 Digest auth from RFC 2617 */ } HTTPAuthType; +typedef struct { + char nonce[300]; /**< Server specified nonce */ + char algorithm[10]; /**< Server specified digest algorithm */ + char qop[30]; /**< Quality of protection, containing the one + * that we've chosen to use, from the + * alternatives that the server offered. */ + char opaque[300]; /**< A server-specified string that should be + * included in authentication responses, not + * included in the actual digest calculation. */ + int nc; /**< Nonce count, the number of earlier replies + * where this particular nonce has been used. */ +} DigestParams; + /** * HTTP Authentication state structure. Must be zero-initialized * before used with the functions below. @@ -44,6 +58,10 @@ typedef struct { * Authentication realm */ char realm[200]; + /** + * The parameters specifiec to digest authentication. + */ + DigestParams digest_params; } HTTPAuthState; void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, |