security_file_certgen.cc File Reference
#include "squid.h"
#include "helper/protocol_defines.h"
#include "security/cert_generators/file/certificate_db.h"
#include "ssl/crtd_message.h"
#include <cstring>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <string>
Include dependency graph for security_file_certgen.cc:

Go to the source code of this file.

Functions

time_t getCurrentTime (void)
 Get current time. More...
 
static size_t parseBytesUnits (const char *unit)
 
static bool parseBytesOptionValue (size_t *bptr, char const *value)
 Parse uninterrapted string of bytes value. It looks like "4MB". More...
 
static void usage ()
 Print help using response code. More...
 
static bool processNewRequest (Ssl::CrtdMessage &request_message, std::string const &db_path, size_t max_db_size, size_t fs_block_size)
 Process new request message. More...
 
int main (int argc, char *argv[])
 This is the external security_file_certgen process. More...
 

Variables

static const char *const B_KBYTES_STR = "KB"
 
static const char *const B_MBYTES_STR = "MB"
 
static const char *const B_GBYTES_STR = "GB"
 
static const char *const B_BYTES_STR = "B"
 

Function Documentation

◆ getCurrentTime()

◆ main()

◆ parseBytesOptionValue()

static bool parseBytesOptionValue ( size_t bptr,
char const *  value 
)
static

Definition at line 115 of file security_file_certgen.cc.

References parseBytesUnits().

Referenced by main().

◆ parseBytesUnits()

static size_t parseBytesUnits ( const char *  unit)
static

Parse bytes unit. It would be one of the next value: MB, GB, KB or B. This function is caseinsensitive.

Definition at line 94 of file security_file_certgen.cc.

References B_BYTES_STR, B_GBYTES_STR, B_KBYTES_STR, and B_MBYTES_STR.

Referenced by parseBytesOptionValue().

◆ processNewRequest()

◆ usage()

static void usage ( void  )
static

Definition at line 144 of file security_file_certgen.cc.

References Ssl::CrtdMessage::code_new_certificate, and Ssl::CrtdMessage::param_host.

Referenced by main().

Variable Documentation

◆ B_BYTES_STR

const char* const B_BYTES_STR = "B"
static

Definition at line 76 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_GBYTES_STR

const char* const B_GBYTES_STR = "GB"
static

Definition at line 75 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_KBYTES_STR

const char* const B_KBYTES_STR = "KB"
static

Definition at line 73 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_MBYTES_STR

const char* const B_MBYTES_STR = "MB"
static

Definition at line 74 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors