ErrorDetail.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2022 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_ERROR_DETAIL_H
10 #define _SQUID_SSL_ERROR_DETAIL_H
11 
12 #include "security/ErrorDetail.h"
13 
14 // TODO: Remove Security::X wrappers and move the remaining configurable error
15 // details (i.e. templates/error-details.txt) code to src/security/ErrorDetail.
16 
17 namespace Ssl
18 {
24 bool ParseErrorString(const char *name, Security::Errors &);
25 
28 GetErrorCode(const char *name)
29 {
30  return Security::ErrorCodeFromName(name);
31 }
32 
35 inline const char *
36 GetErrorName(const Security::ErrorCode code, const bool prefixRawCode = false)
37 {
38  return Security::ErrorNameFromCode(code, prefixRawCode);
39 }
40 
42 const char *GetErrorDescr(Security::ErrorCode value);
43 
45 bool ErrorIsOptional(const char *name);
46 
47 }//namespace Ssl
48 #endif
49 
ErrorCode ErrorCodeFromName(const char *name)
Definition: ErrorDetail.cc:408
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:102
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:36
bool ParseErrorString(const char *name, Security::Errors &)
Definition: ErrorDetail.cc:110
const char * GetErrorDescr(Security::ErrorCode value)
A short description of the TLS error "value".
Definition: ErrorDetail.cc:158
unsigned char code
Definition: html_quote.c:20
Definition: Xaction.cc:48
const char * ErrorNameFromCode(ErrorCode err, bool prefixRawCode=false)
Definition: ErrorDetail.cc:428
Security::ErrorCode GetErrorCode(const char *name)
The Security::ErrorCode code of the error described by "name".
Definition: ErrorDetail.h:28
std::unordered_set< Security::ErrorCode > Errors
Definition: forward.h:136
bool ErrorIsOptional(const char *name)
Definition: ErrorDetail.cc:148

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors