Config.cc File Reference
#include "squid.h"
#include "auth/CredentialsCache.h"
#include "auth/digest/Config.h"
#include "auth/digest/Scheme.h"
#include "auth/digest/User.h"
#include "auth/digest/UserRequest.h"
#include "auth/Gadgets.h"
#include "auth/State.h"
#include "base/LookupTable.h"
#include "base64.h"
#include "cache_cf.h"
#include "event.h"
#include "helper.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "mgr/Registration.h"
#include "rfc2617.h"
#include "sbuf/SBuf.h"
#include "SquidTime.h"
#include "Store.h"
#include "StrList.h"
#include "wordlist.h"
#include "mem/Pool.h"
#include <random>
Include dependency graph for Config.cc:

Go to the source code of this file.

Enumerations

enum  http_digest_attr_type {
  DIGEST_USERNAME,
  DIGEST_REALM,
  DIGEST_QOP,
  DIGEST_ALGORITHM,
  DIGEST_URI,
  DIGEST_NONCE,
  DIGEST_NC,
  DIGEST_CNONCE,
  DIGEST_RESPONSE,
  DIGEST_INVALID_ATTR
}
 

Functions

static void authenticateDigestNonceCacheCleanup (void *data)
 
static digest_nonce_h * authenticateDigestNonceFindNonce (const char *nonceb64)
 
static void authenticateDigestNonceDelete (digest_nonce_h *nonce)
 
static void authenticateDigestNonceSetup (void)
 
static void authDigestNonceEncode (digest_nonce_h *nonce)
 
static void authDigestNonceLink (digest_nonce_h *nonce)
 
static void authDigestNonceUserUnlink (digest_nonce_h *nonce)
 
digest_nonce_h * authenticateDigestNonceNew (void)
 
void authenticateDigestNonceShutdown (void)
 
void authDigestNonceUnlink (digest_nonce_h *nonce)
 
const char * authenticateDigestNonceNonceb64 (const digest_nonce_h *nonce)
 
int authDigestNonceIsValid (digest_nonce_h *nonce, char nc[9])
 
int authDigestNonceIsStale (digest_nonce_h *nonce)
 
int authDigestNonceLastRequest (digest_nonce_h *nonce)
 
void authDigestNoncePurge (digest_nonce_h *nonce)
 
static void authenticateDigestStats (StoreEntry *sentry)
 
void authDigestUserLinkNonce (Auth::Digest::User *user, digest_nonce_h *nonce)
 
static Auth::UserRequest::Pointer authDigestLogUsername (char *username, Auth::UserRequest::Pointer auth_user_request, const char *requestRealm)
 

Variables

static AUTHSSTATS authenticateDigestStats
 
helperdigestauthenticators = NULL
 
static hash_tabledigest_nonce_cache
 
static int authdigest_initialised = 0
 
static MemAllocatordigest_nonce_pool = NULL
 
static const LookupTable
< http_digest_attr_type >
::Record 
DigestAttrs []
 
LookupTable
< http_digest_attr_type
DigestFieldsLookupTable (DIGEST_INVALID_ATTR, DigestAttrs)
 

Enumeration Type Documentation

Enumerator
DIGEST_USERNAME 
DIGEST_REALM 
DIGEST_QOP 
DIGEST_ALGORITHM 
DIGEST_URI 
DIGEST_NONCE 
DIGEST_NC 
DIGEST_CNONCE 
DIGEST_RESPONSE 
DIGEST_INVALID_ATTR 

Definition at line 55 of file Config.cc.

Function Documentation

static Auth::UserRequest::Pointer authDigestLogUsername ( char *  username,
Auth::UserRequest::Pointer  auth_user_request,
const char *  requestRealm 
)
static

Definition at line 712 of file Config.cc.

References assert, Auth::AUTH_BROKEN, debugs, Auth::SchemeConfig::Find(), and NULL.

static void authDigestNonceEncode ( digest_nonce_h *  nonce)
static
int authDigestNonceIsStale ( digest_nonce_h *  nonce)
int authDigestNonceIsValid ( digest_nonce_h *  nonce,
char  nc[9] 
)

Definition at line 352 of file Config.cc.

References authDigestNonceIsStale(), debugs, Auth::SchemeConfig::Find(), and NULL.

int authDigestNonceLastRequest ( digest_nonce_h *  nonce)
Return values
0the digest is not stale yet
-1the digest will be stale on the next request

Definition at line 433 of file Config.cc.

References debugs, and Auth::SchemeConfig::Find().

static void authDigestNonceLink ( digest_nonce_h *  nonce)
static

Definition at line 286 of file Config.cc.

References assert, debugs, and NULL.

Referenced by authDigestUserLinkNonce(), and authenticateDigestNonceNew().

void authDigestNoncePurge ( digest_nonce_h *  nonce)
void authDigestNonceUnlink ( digest_nonce_h *  nonce)
static void authDigestNonceUserUnlink ( digest_nonce_h *  nonce)
static
void authDigestUserLinkNonce ( Auth::Digest::User *  user,
digest_nonce_h *  nonce 
)
static void authenticateDigestNonceCacheCleanup ( void *  data)
static
static void authenticateDigestNonceDelete ( digest_nonce_h *  nonce)
static

Definition at line 190 of file Config.cc.

References assert, MemAllocator::freeOne(), hash_remove_link(), and safe_free.

Referenced by authDigestNonceUnlink().

static digest_nonce_h * authenticateDigestNonceFindNonce ( const char *  nonceb64)
static

Definition at line 332 of file Config.cc.

References authenticateDigestNonceNonceb64(), debugs, hash_lookup(), and NULL.

Referenced by authenticateDigestNonceNew().

digest_nonce_h* authenticateDigestNonceNew ( void  )
const char* authenticateDigestNonceNonceb64 ( const digest_nonce_h *  nonce)

Definition at line 323 of file Config.cc.

References NULL.

Referenced by authenticateDigestNonceFindNonce().

static void authenticateDigestNonceSetup ( void  )
static
void authenticateDigestNonceShutdown ( void  )

Definition at line 223 of file Config.cc.

References assert, authDigestNoncePurge(), debugs, digest_nonce_pool, hash_first(), hash_next(), and NULL.

static void authenticateDigestStats ( StoreEntry sentry)
static

Definition at line 631 of file Config.cc.

References helper::packStatsInto().

Variable Documentation

int authdigest_initialised = 0
static

Definition at line 52 of file Config.cc.

AUTHSSTATS authenticateDigestStats
static

Definition at line 46 of file Config.cc.

hash_table* digest_nonce_cache
static

Definition at line 50 of file Config.cc.

MemAllocator* digest_nonce_pool = NULL
static

Definition at line 53 of file Config.cc.

Referenced by authenticateDigestNonceShutdown().

const LookupTable<http_digest_attr_type>::Record DigestAttrs[]
static
Initial value:
= {
{"username", DIGEST_USERNAME},
{"realm", DIGEST_REALM},
{"qop", DIGEST_QOP},
{"algorithm", DIGEST_ALGORITHM},
{"uri", DIGEST_URI},
{"nonce", DIGEST_NONCE},
{"nc", DIGEST_NC},
{"cnonce", DIGEST_CNONCE},
{"response", DIGEST_RESPONSE},
}

Definition at line 69 of file Config.cc.

helper* digestauthenticators = NULL

Definition at line 48 of file Config.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors