CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
whitelist::Whitelist Class Reference

#include <whitelist.h>

Collaboration diagram for whitelist::Whitelist:

Public Types

enum  Status { kStNone, kStAvailable }
 

Public Member Functions

 Whitelist (const std::string &fqrn, download::DownloadManager *download_manager, signature::SignatureManager *signature_manager)
 
 ~Whitelist ()
 
 Whitelist (const Whitelist &other)
 
Whitelistoperator= (const Whitelist &other)
 
Failures LoadUrl (const std::string &base_url)
 
Failures LoadMem (const std::string &whitelist)
 
void CopyBuffers (unsigned *plain_size, unsigned char **plain_buf, unsigned *pkcs7_size, unsigned char **pkcs7_buf) const
 
time_t expires () const
 
bool IsExpired () const
 
Failures VerifyLoadedCertificate () const
 
std::string ExportString () const
 
Status status () const
 

Static Public Member Functions

static std::string CreateString (const std::string &fqrn, int validity_days, shash::Algorithms hash_algorithm, signature::SignatureManager *signature_manager)
 

Private Member Functions

 FRIEND_TEST (T_Whitelist, ParseWhitelist)
 
 Whitelist ()
 
bool IsBefore (time_t now, const struct tm &t_whitelist)
 
Failures VerifyWhitelist ()
 
Failures ParseWhitelist (const unsigned char *whitelist, const unsigned whitelist_size)
 
void Reset ()
 

Private Attributes

std::string fqrn_
 
download::DownloadManagerdownload_manager_
 
signature::SignatureManagersignature_manager_
 
Status status_
 
std::vector< shash::Anyfingerprints_
 
time_t expires_
 
int verification_flags_
 
unsigned char * plain_buf_
 
unsigned plain_size_
 
unsigned char * pkcs7_buf_
 
unsigned pkcs7_size_
 

Static Private Attributes

static const int kFlagVerifyRsa = 0x01
 
static const int kFlagVerifyPkcs7 = 0x02
 
static const int kFlagVerifyCaChain = 0x04
 

Detailed Description

Definition at line 71 of file whitelist.h.

Member Enumeration Documentation

Enumerator
kStNone 
kStAvailable 

Definition at line 75 of file whitelist.h.

Constructor & Destructor Documentation

whitelist::Whitelist::Whitelist ( const std::string &  fqrn,
download::DownloadManager download_manager,
signature::SignatureManager signature_manager 
)
whitelist::Whitelist::~Whitelist ( )

Definition at line 465 of file whitelist.cc.

Here is the call graph for this function:

whitelist::Whitelist::Whitelist ( const Whitelist other)
explicit

Definition at line 420 of file whitelist.cc.

Here is the call graph for this function:

whitelist::Whitelist::Whitelist ( )
private

Definition at line 434 of file whitelist.cc.

Member Function Documentation

void whitelist::Whitelist::CopyBuffers ( unsigned *  plain_size,
unsigned char **  plain_buf,
unsigned *  pkcs7_size,
unsigned char **  pkcs7_buf 
) const

Definition at line 28 of file whitelist.cc.

Referenced by manifest::DoVerify(), operator=(), and Whitelist().

Here is the caller graph for this function:

std::string whitelist::Whitelist::CreateString ( const std::string &  fqrn,
int  validity_days,
shash::Algorithms  hash_algorithm,
signature::SignatureManager signature_manager 
)
static

Definition at line 47 of file whitelist.cc.

Referenced by publish::CreateKeychain().

Here is the call graph for this function:

Here is the caller graph for this function:

time_t whitelist::Whitelist::expires ( ) const

Definition at line 83 of file whitelist.cc.

Referenced by swissknife::CommandLetter::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string whitelist::Whitelist::ExportString ( ) const

Definition at line 77 of file whitelist.cc.

Referenced by publish::PushWhitelist().

Here is the caller graph for this function:

whitelist::Whitelist::FRIEND_TEST ( T_Whitelist  ,
ParseWhitelist   
)
private
bool whitelist::Whitelist::IsBefore ( time_t  now,
const struct tm &  t_whitelist 
)
private

Helps for the time being with whitelists valid until after Y2038 on 32 bit systems.

Definition at line 265 of file whitelist.cc.

bool whitelist::Whitelist::IsExpired ( ) const

Definition at line 89 of file whitelist.cc.

Referenced by swissknife::CommandLetter::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

Failures whitelist::Whitelist::LoadMem ( const std::string &  whitelist)

Definition at line 196 of file whitelist.cc.

Referenced by publish::CreateKeychain().

Here is the caller graph for this function:

Failures whitelist::Whitelist::LoadUrl ( const std::string &  base_url)

Definition at line 216 of file whitelist.cc.

Referenced by manifest::DoVerify(), publish::DownloadRootObjects(), and swissknife::CommandLetter::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

Whitelist & whitelist::Whitelist::operator= ( const Whitelist other)

Definition at line 447 of file whitelist.cc.

Here is the call graph for this function:

Failures whitelist::Whitelist::ParseWhitelist ( const unsigned char *  whitelist,
const unsigned  whitelist_size 
)
private

Definition at line 280 of file whitelist.cc.

Here is the call graph for this function:

void whitelist::Whitelist::Reset ( )
private

Definition at line 389 of file whitelist.cc.

Referenced by operator=(), and ~Whitelist().

Here is the caller graph for this function:

Status whitelist::Whitelist::status ( ) const
inline

Definition at line 103 of file whitelist.h.

Referenced by publish::DownloadRootObjects().

Here is the caller graph for this function:

Failures whitelist::Whitelist::VerifyLoadedCertificate ( ) const

Definition at line 95 of file whitelist.cc.

Referenced by manifest::DoVerify(), and swissknife::CommandLetter::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

Failures whitelist::Whitelist::VerifyWhitelist ( )
private

Expects whitelist to be loaded into plain_buf_ / plain_size_ and already parsed so that verification_flags_ is set

Definition at line 129 of file whitelist.cc.

Here is the call graph for this function:

Member Data Documentation

download::DownloadManager* whitelist::Whitelist::download_manager_
private

Definition at line 119 of file whitelist.h.

Referenced by operator=().

time_t whitelist::Whitelist::expires_
private

Definition at line 124 of file whitelist.h.

Referenced by operator=().

std::vector<shash::Any> whitelist::Whitelist::fingerprints_
private

Definition at line 123 of file whitelist.h.

Referenced by operator=().

std::string whitelist::Whitelist::fqrn_
private

Definition at line 118 of file whitelist.h.

Referenced by operator=().

const int whitelist::Whitelist::kFlagVerifyCaChain = 0x04
staticprivate

Definition at line 110 of file whitelist.h.

const int whitelist::Whitelist::kFlagVerifyPkcs7 = 0x02
staticprivate

Definition at line 109 of file whitelist.h.

const int whitelist::Whitelist::kFlagVerifyRsa = 0x01
staticprivate

Definition at line 108 of file whitelist.h.

unsigned char* whitelist::Whitelist::pkcs7_buf_
private

Definition at line 128 of file whitelist.h.

Referenced by operator=(), and Whitelist().

unsigned whitelist::Whitelist::pkcs7_size_
private

Definition at line 129 of file whitelist.h.

Referenced by operator=(), and Whitelist().

unsigned char* whitelist::Whitelist::plain_buf_
private

Definition at line 126 of file whitelist.h.

Referenced by operator=(), and Whitelist().

unsigned whitelist::Whitelist::plain_size_
private

Definition at line 127 of file whitelist.h.

Referenced by operator=(), and Whitelist().

signature::SignatureManager* whitelist::Whitelist::signature_manager_
private

Definition at line 120 of file whitelist.h.

Referenced by operator=().

Status whitelist::Whitelist::status_
private

Definition at line 122 of file whitelist.h.

Referenced by operator=(), and status().

int whitelist::Whitelist::verification_flags_
private

Definition at line 125 of file whitelist.h.

Referenced by operator=().


The documentation for this class was generated from the following files: