]>
Commit | Line | Data |
---|---|---|
f5691f9c | 1 | /* |
bf95c10a | 2 | * Copyright (C) 1996-2022 The Squid Software Foundation and contributors |
f5691f9c | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
f5691f9c | 7 | */ |
8 | ||
f7f3304a | 9 | #include "squid.h" |
12daeef6 | 10 | #include "auth/digest/Config.h" |
616cfc4c | 11 | #include "auth/digest/Scheme.h" |
582c2af2 | 12 | #include "Debug.h" |
c59baaa8 | 13 | #include "DebugMessages.h" |
582c2af2 | 14 | #include "globals.h" |
5817ee13 | 15 | #include "helper.h" |
f5691f9c | 16 | |
c6cf8dee | 17 | Auth::Scheme::Pointer Auth::Digest::Scheme::_instance = NULL; |
d6374be6 | 18 | |
c6cf8dee | 19 | Auth::Scheme::Pointer |
d6374be6 | 20 | Auth::Digest::Scheme::GetInstance() |
f5691f9c | 21 | { |
5817ee13 | 22 | if (_instance == NULL) { |
d6374be6 | 23 | _instance = new Auth::Digest::Scheme(); |
5817ee13 AJ |
24 | AddScheme(_instance); |
25 | } | |
26 | return _instance; | |
f5691f9c | 27 | } |
28 | ||
29 | char const * | |
d6374be6 | 30 | Auth::Digest::Scheme::type() const |
f5691f9c | 31 | { |
32 | return "digest"; | |
33 | } | |
34 | ||
d6374be6 | 35 | void |
c6cf8dee | 36 | Auth::Digest::Scheme::shutdownCleanup() |
d6374be6 AJ |
37 | { |
38 | if (_instance == NULL) | |
39 | return; | |
40 | ||
d6374be6 AJ |
41 | authenticateDigestNonceShutdown(); |
42 | ||
43 | _instance = NULL; | |
c59baaa8 | 44 | debugs(29, Critical(59), "Shutdown: Digest authentication."); |
d6374be6 | 45 | } |
5817ee13 | 46 | |
dc79fed8 | 47 | Auth::SchemeConfig * |
d6374be6 | 48 | Auth::Digest::Scheme::createConfig() |
5817ee13 | 49 | { |
372fccd6 | 50 | Auth::Digest::Config *digestCfg = new Auth::Digest::Config; |
dc79fed8 | 51 | return dynamic_cast<Auth::SchemeConfig*>(digestCfg); |
5817ee13 | 52 | } |
7512e3f9 | 53 |