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 "auth/toUtf.h"
#include "base/LookupTable.h"
#include "base/Random.h"
#include "cache_cf.h"
#include "event.h"
#include "helper.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "md5.h"
#include "mgr/Registration.h"
#include "rfc2617.h"
#include "sbuf/SBuf.h"
#include "sbuf/StringConvert.h"
#include "Store.h"
#include "StrList.h"
#include "wordlist.h"
#include "mem/Pool.h"
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 *noncehex)
 
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 * authenticateDigestNonceNonceHex (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 = nullptr
 
static hash_tabledigest_nonce_cache
 
static int authdigest_initialised = 0
 
static MemAllocatordigest_nonce_pool = nullptr
 
static const LookupTable< http_digest_attr_type >::Record DigestAttrs []
 
LookupTable< http_digest_attr_typeDigestFieldsLookupTable (DIGEST_INVALID_ATTR, DigestAttrs)
 

Enumeration Type Documentation

◆ http_digest_attr_type

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

◆ authDigestLogUsername()

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

◆ authDigestNonceEncode()

static void authDigestNonceEncode ( digest_nonce_h *  nonce)
static

Definition at line 100 of file Config.cc.

References CvtHex(), H(), SquidMD5Final(), SquidMD5Init(), SquidMD5Update(), xcalloc(), and xfree.

Referenced by authenticateDigestNonceNew().

◆ authDigestNonceIsStale()

int authDigestNonceIsStale ( digest_nonce_h *  nonce)

◆ authDigestNonceIsValid()

int authDigestNonceIsValid ( digest_nonce_h *  nonce,
char  nc[9] 
)

Definition at line 324 of file Config.cc.

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

◆ authDigestNonceLastRequest()

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 405 of file Config.cc.

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

◆ authDigestNonceLink()

static void authDigestNonceLink ( digest_nonce_h *  nonce)
static

Definition at line 269 of file Config.cc.

References assert, and debugs.

Referenced by authDigestUserLinkNonce(), and authenticateDigestNonceNew().

◆ authDigestNoncePurge()

void authDigestNoncePurge ( digest_nonce_h *  nonce)

◆ authDigestNonceUnlink()

void authDigestNonceUnlink ( digest_nonce_h *  nonce)

◆ authDigestNonceUserUnlink()

static void authDigestNonceUserUnlink ( digest_nonce_h *  nonce)
static

◆ authDigestUserLinkNonce()

void authDigestUserLinkNonce ( Auth::Digest::User *  user,
digest_nonce_h *  nonce 
)

Definition at line 650 of file Config.cc.

References assert, authDigestNonceLink(), dlinkAddTail(), and node::next.

◆ authenticateDigestNonceCacheCleanup()

◆ authenticateDigestNonceDelete()

static void authenticateDigestNonceDelete ( digest_nonce_h *  nonce)
static

Definition at line 187 of file Config.cc.

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

Referenced by authDigestNonceUnlink().

◆ authenticateDigestNonceFindNonce()

static digest_nonce_h * authenticateDigestNonceFindNonce ( const char *  noncehex)
static

◆ authenticateDigestNonceNew()

◆ authenticateDigestNonceNonceHex()

const char * authenticateDigestNonceNonceHex ( const digest_nonce_h *  nonce)

Definition at line 295 of file Config.cc.

Referenced by authenticateDigestNonceFindNonce().

◆ authenticateDigestNonceSetup()

static void authenticateDigestNonceSetup ( void  )
static

◆ authenticateDigestNonceShutdown()

void authenticateDigestNonceShutdown ( void  )

Definition at line 213 of file Config.cc.

References assert, authDigestNoncePurge(), debugs, digest_nonce_cache, hash_first(), and hash_next().

◆ authenticateDigestStats()

static void authenticateDigestStats ( StoreEntry sentry)
static

Definition at line 603 of file Config.cc.

References digestauthenticators, and helper::packStatsInto().

Variable Documentation

◆ authdigest_initialised

int authdigest_initialised = 0
static

Definition at line 52 of file Config.cc.

◆ authenticateDigestStats

AUTHSSTATS authenticateDigestStats
static

Definition at line 46 of file Config.cc.

◆ digest_nonce_cache

◆ digest_nonce_pool

MemAllocator* digest_nonce_pool = nullptr
static

◆ DigestAttrs

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},
}
@ DIGEST_INVALID_ATTR
Definition: Config.cc:65
@ DIGEST_QOP
Definition: Config.cc:58
@ DIGEST_RESPONSE
Definition: Config.cc:64
@ DIGEST_ALGORITHM
Definition: Config.cc:59
@ DIGEST_NONCE
Definition: Config.cc:61
@ DIGEST_CNONCE
Definition: Config.cc:63
@ DIGEST_URI
Definition: Config.cc:60
@ DIGEST_USERNAME
Definition: Config.cc:56
@ DIGEST_NC
Definition: Config.cc:62
@ DIGEST_REALM
Definition: Config.cc:57

Definition at line 69 of file Config.cc.

◆ digestauthenticators

helper* digestauthenticators = nullptr

Definition at line 48 of file Config.cc.

Referenced by authenticateDigestStats().

◆ DigestFieldsLookupTable

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors