]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/httpauth.h
rmdec: check av_new_packet return value
[ffmpeg] / libavformat / httpauth.h
index d2a4a5530507806bef73eba5b0d4d0d7c805424a..99bf43ffdcf25d6e2b79c7d215a948c108c0a2f3 100644 (file)
@@ -32,7 +32,7 @@ typedef enum HTTPAuthType {
     HTTP_AUTH_DIGEST,      /**< HTTP 1.1 Digest auth from RFC 2617 */
 } HTTPAuthType;
 
-typedef struct {
+typedef struct DigestParams {
     char nonce[300];       /**< Server specified nonce */
     char algorithm[10];    /**< Server specified digest algorithm */
     char qop[30];          /**< Quality of protection, containing the one
@@ -41,6 +41,9 @@ typedef struct {
     char opaque[300];      /**< A server-specified string that should be
                              *  included in authentication responses, not
                              *  included in the actual digest calculation. */
+    char stale[10];        /**< The server indicated that the auth was ok,
+                             * but needs to be redone with a new, non-stale
+                             * nonce. */
     int nc;                /**< Nonce count, the number of earlier replies
                              *  where this particular nonce has been used. */
 } DigestParams;
@@ -49,7 +52,7 @@ typedef struct {
  * HTTP Authentication state structure. Must be zero-initialized
  * before used with the functions below.
  */
-typedef struct {
+typedef struct HTTPAuthState {
     /**
      * The currently chosen auth type.
      */
@@ -62,6 +65,10 @@ typedef struct {
      * The parameters specifiec to digest authentication.
      */
     DigestParams digest_params;
+    /**
+     * Auth ok, but needs to be resent with a new nonce.
+     */
+    int stale;
 } HTTPAuthState;
 
 void ff_http_auth_handle_header(HTTPAuthState *state, const char *key,