ErrorDetail.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SRC_SSL_ERRORDETAIL_H
10 #define SQUID_SRC_SSL_ERRORDETAIL_H
11 
12 #include "security/ErrorDetail.h"
13 
14 #include <optional>
15 
16 // TODO: Remove Security::X wrappers and move the remaining configurable error
17 // details (i.e. templates/error-details.txt) code to src/security/ErrorDetail.
18 
19 namespace Ssl
20 {
26 bool ParseErrorString(const char *name, Security::Errors &);
27 
30 GetErrorCode(const char *name)
31 {
32  return Security::ErrorCodeFromName(name);
33 }
34 
37 inline const char *
38 GetErrorName(const Security::ErrorCode code, const bool prefixRawCode = false)
39 {
40  return Security::ErrorNameFromCode(code, prefixRawCode);
41 }
42 
45 std::optional<SBuf> GetErrorDescr(Security::ErrorCode);
46 
48 bool ErrorIsOptional(const char *name);
49 
50 }//namespace Ssl
51 #endif /* SQUID_SRC_SSL_ERRORDETAIL_H */
52 
ErrorCode ErrorCodeFromName(const char *name)
Definition: ErrorDetail.cc:410
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:131
std::optional< SBuf > GetErrorDescr(Security::ErrorCode)
Definition: ErrorDetail.cc:159
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:38
bool ParseErrorString(const char *name, Security::Errors &)
Definition: ErrorDetail.cc:111
Definition: Xaction.cc:39
const char * ErrorNameFromCode(ErrorCode err, bool prefixRawCode=false)
Definition: ErrorDetail.cc:430
Security::ErrorCode GetErrorCode(const char *name)
The Security::ErrorCode code of the error described by "name".
Definition: ErrorDetail.h:30
int code
Definition: smb-errors.c:145
std::unordered_set< Security::ErrorCode > Errors
Definition: forward.h:165
bool ErrorIsOptional(const char *name)
Definition: ErrorDetail.cc:149

 

Introduction

Documentation

Support

Miscellaneous