security_file_certgen.cc File Reference
#include "squid.h"
#include "base/TextException.h"
#include "debug/Stream.h"
#include "helper/protocol_defines.h"
#include "sbuf/Stream.h"
#include "security/cert_generators/file/certificate_db.h"
#include "ssl/crtd_message.h"
#include "time/gadgets.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

static size_t parseBytesUnits (const char *unit)
 
static size_t parseBytesOptionValue (const char *const name, const char *const value)
 
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

◆ main()

◆ parseBytesOptionValue()

static size_t parseBytesOptionValue ( const char *const  name,
const char *const  value 
)
static

Parse the number of bytes given as <integer><unit> value (e.g., 4MB).

Parameters
namethe name of the option being parsed

Definition at line 107 of file security_file_certgen.cc.

References Here, parseBytesUnits(), and ToSBuf().

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 86 of file security_file_certgen.cc.

References B_BYTES_STR, B_GBYTES_STR, B_KBYTES_STR, B_MBYTES_STR, Here, and ToSBuf().

Referenced by parseBytesOptionValue().

◆ processNewRequest()

◆ usage()

static void usage ( void  )
static

Definition at line 136 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 80 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_GBYTES_STR

const char* const B_GBYTES_STR = "GB"
static

Definition at line 79 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_KBYTES_STR

const char* const B_KBYTES_STR = "KB"
static

Definition at line 77 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

◆ B_MBYTES_STR

const char* const B_MBYTES_STR = "MB"
static

Definition at line 78 of file security_file_certgen.cc.

Referenced by parseBytesUnits().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors