ErrorDetail.cc File Reference
#include "squid.h"
#include "errorpage.h"
#include "fatal.h"
#include "ssl/ErrorDetail.h"
#include <climits>
#include <map>
Include dependency graph for ErrorDetail.cc:

Go to the source code of this file.

Classes

struct  SslErrorEntry
 
struct  SslErrorAlias
 

Typedefs

typedef std::map
< Security::ErrorCode, const
SslErrorEntry * > 
SslErrors
 
typedef std::map< std::string,
const Security::ErrorCode * > 
SslErrorShortcuts
 

Functions

static void loadSslErrorMap ()
 
static void loadSslErrorShortcutsMap ()
 
static int copy_cn (void *check_data, ASN1_STRING *cn_data)
 

Variables

static const char * SslErrorDetailDefaultStr = "SSL handshake error (%err_name)"
 
SslErrors TheSslErrors
 
static SslErrorEntry TheSslErrorArray []
 
static const char * OptionalSslErrors []
 
static const Security::ErrorCode hasExpired [] = {X509_V_ERR_CERT_HAS_EXPIRED, SSL_ERROR_NONE}
 
static const Security::ErrorCode notYetValid [] = {X509_V_ERR_CERT_NOT_YET_VALID, SSL_ERROR_NONE}
 
static const Security::ErrorCode domainMismatch [] = {SQUID_X509_V_ERR_DOMAIN_MISMATCH, SSL_ERROR_NONE}
 
static const Security::ErrorCode certUntrusted []
 
static const Security::ErrorCode certSelfSigned [] = {X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT, SSL_ERROR_NONE}
 
static SslErrorAlias TheSslErrorShortcutsArray []
 
SslErrorShortcuts TheSslErrorShortcuts
 

Typedef Documentation

typedef std::map<Security::ErrorCode, const SslErrorEntry *> SslErrors

Definition at line 24 of file ErrorDetail.cc.

typedef std::map<std::string, const Security::ErrorCode *> SslErrorShortcuts

Definition at line 327 of file ErrorDetail.cc.

Function Documentation

static int copy_cn ( void *  check_data,
ASN1_STRING *  cn_data 
)
static

Definition at line 446 of file ErrorDetail.cc.

References String::append(), and String::size().

Referenced by Ssl::ErrorDetail::cn().

static void loadSslErrorMap ( )
static

Definition at line 330 of file ErrorDetail.cc.

References assert, i, SslErrorEntry::name, TheSslErrors, and SslErrorEntry::value.

Referenced by Ssl::GetErrorName().

static void loadSslErrorShortcutsMap ( )
static

Definition at line 338 of file ErrorDetail.cc.

References assert, i, SslErrorAlias::name, and TheSslErrorShortcuts.

Referenced by Ssl::ParseErrorString().

Variable Documentation

const Security::ErrorCode certSelfSigned[] = {X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT, SSL_ERROR_NONE}
static

Definition at line 306 of file ErrorDetail.cc.

const Security::ErrorCode certUntrusted[]
static
Initial value:
= {X509_V_ERR_INVALID_CA,
X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
X509_V_ERR_CERT_UNTRUSTED, SSL_ERROR_NONE
}

Definition at line 299 of file ErrorDetail.cc.

const Security::ErrorCode domainMismatch[] = {SQUID_X509_V_ERR_DOMAIN_MISMATCH, SSL_ERROR_NONE}
static

Definition at line 298 of file ErrorDetail.cc.

const Security::ErrorCode hasExpired[] = {X509_V_ERR_CERT_HAS_EXPIRED, SSL_ERROR_NONE}
static

Definition at line 296 of file ErrorDetail.cc.

const Security::ErrorCode notYetValid[] = {X509_V_ERR_CERT_NOT_YET_VALID, SSL_ERROR_NONE}
static

Definition at line 297 of file ErrorDetail.cc.

const char* OptionalSslErrors[]
static
Initial value:
= {
"X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER",
"X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION",
"X509_V_ERR_KEYUSAGE_NO_CRL_SIGN",
"X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION",
"X509_V_ERR_INVALID_NON_CA",
"X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED",
"X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE",
"X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED",
"X509_V_ERR_INVALID_EXTENSION",
"X509_V_ERR_INVALID_POLICY_EXTENSION",
"X509_V_ERR_NO_EXPLICIT_POLICY",
"X509_V_ERR_DIFFERENT_CRL_SCOPE",
"X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE",
"X509_V_ERR_UNNESTED_RESOURCE",
"X509_V_ERR_PERMITTED_VIOLATION",
"X509_V_ERR_EXCLUDED_VIOLATION",
"X509_V_ERR_SUBTREE_MINMAX",
"X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE",
"X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX",
"X509_V_ERR_UNSUPPORTED_NAME_SYNTAX",
"X509_V_ERR_CRL_PATH_VALIDATION_ERROR",
}
#define NULL
Definition: types.h:166

Definition at line 266 of file ErrorDetail.cc.

Referenced by Ssl::ErrorIsOptional().

const char* SslErrorDetailDefaultStr = "SSL handshake error (%err_name)"
static

Definition at line 22 of file ErrorDetail.cc.

Referenced by Ssl::ErrorDetail::buildDetail().

SslErrorEntry TheSslErrorArray[]
static

Definition at line 27 of file ErrorDetail.cc.

SslErrors TheSslErrors

Definition at line 25 of file ErrorDetail.cc.

Referenced by Ssl::GetErrorName(), and loadSslErrorMap().

SslErrorShortcuts TheSslErrorShortcuts

Definition at line 328 of file ErrorDetail.cc.

Referenced by loadSslErrorShortcutsMap(), and Ssl::ParseErrorString().

SslErrorAlias TheSslErrorShortcutsArray[]
static
Initial value:
= {
{"ssl::certHasExpired", hasExpired},
{"certHasExpired", hasExpired},
{"ssl::certNotYetValid", notYetValid},
{"certNotYetValid", notYetValid},
{"ssl::certDomainMismatch", domainMismatch},
{"certDomainMismatch", domainMismatch},
{"ssl::certUntrusted", certUntrusted},
{"certUntrusted", certUntrusted},
{"ssl::certSelfSigned", certSelfSigned},
{"certSelfSigned", certSelfSigned},
}
static const Security::ErrorCode certUntrusted[]
Definition: ErrorDetail.cc:299
static const Security::ErrorCode hasExpired[]
Definition: ErrorDetail.cc:296
static const Security::ErrorCode certSelfSigned[]
Definition: ErrorDetail.cc:306
static const Security::ErrorCode notYetValid[]
Definition: ErrorDetail.cc:297
static const Security::ErrorCode domainMismatch[]
Definition: ErrorDetail.cc:298
#define NULL
Definition: types.h:166

Definition at line 312 of file ErrorDetail.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors