context_storage.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 #ifndef SQUID_SSL_CONTEXT_STORAGE_H
10 #define SQUID_SSL_CONTEXT_STORAGE_H
11 
12 #if USE_OPENSSL
13 
14 #include "base/LruMap.h"
15 #include "CacheManager.h"
16 #include "compat/openssl.h"
17 #include "ip/Address.h"
18 #include "mgr/Action.h"
19 #include "mgr/Command.h"
20 #include "security/forward.h"
21 #include "SquidTime.h"
22 #include "ssl/gadgets.h"
23 
24 #include <list>
25 #include <map>
26 #if HAVE_OPENSSL_SSL_H
27 #include <openssl/ssl.h>
28 #endif
29 
31 #define SSL_CTX_SIZE 1024
32 
33 namespace Ssl
34 {
35 
40 {
41 public:
43  static Pointer Create(const Mgr::Command::Pointer &cmd);
44  virtual void dump (StoreEntry *sentry);
49  virtual bool aggregatable() const { return false; }
50 };
51 
53 
56 {
58 public:
62  void addLocalStorage(Ip::Address const & address, size_t size_of_store);
66  void reconfigureStart();
67 private:
69  void reconfigureFinish();
71  std::map<Ip::Address, size_t> configureStorage;
74  std::map<Ip::Address, LocalContextStorage *> storage;
75 };
76 
79 } //namespace Ssl
80 #endif // USE_OPENSSL
81 
82 #endif // SQUID_SSL_CONTEXT_STORAGE_H
83 
std::map< Ip::Address, size_t > configureStorage
Storage used on configure or reconfigure.
virtual bool aggregatable() const
void reconfigureFinish()
Called by getLocalStorage method.
CertificateStorageAction(const Mgr::Command::Pointer &cmd)
GlobalContextStorage TheGlobalContextStorage
Global cache for store all SSL server certificates.
Class for storing/manipulating LocalContextStorage per local listening address/port.
Definition: LruMap.h:17
void addLocalStorage(Ip::Address const &address, size_t size_of_store)
Create new SSL context storage for the local listening address/port.
void reconfigureStart()
When reconfigring should be called this method.
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
LruMap< SBuf, Security::ContextPointer, SSL_CTX_SIZE > LocalContextStorage
LocalContextStorage * getLocalStorage(Ip::Address const &address)
Return the local storage for the given listening address/port.
static Pointer Create(const Mgr::Command::Pointer &cmd)
virtual void dump(StoreEntry *sentry)
std::map< Ip::Address, LocalContextStorage * > storage
Map for storing all local ip address and their local storages.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors