cert_validate_message.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_SSL_CERT_VALIDATE_MESSAGE_H
10#define SQUID_SSL_CERT_VALIDATE_MESSAGE_H
11
12#include "base/RefCount.h"
13#include "helper/ResultCode.h"
14#include "ssl/crtd_message.h"
15#include "ssl/support.h"
16
17#include <vector>
18
19namespace Ssl
20{
21
27{
28public:
31 std::string domainName;
32};
33
39{
40public:
42
48 {
49 public:
50 void setCert(X509 *);
51 int id = 0;
53 std::string error_reason;
55 int error_depth = -1;
56 };
57
58 typedef std::vector<RecvdError> RecvdErrors;
59 explicit CertValidationResponse(const Security::SessionPointer &aSession) : ssl(aSession) {}
60
62
65 RecvdError &getError(int errorId);
69};
70
81{
82private:
88 {
89 public:
90 std::string name;
92 void setCert(X509 *);
93 };
94
95public:
97
100 void composeRequest(CertValidationRequest const &vcert);
101
104
106 X509 *getCertByName(std::vector<CertItem> const &, std::string const & name);
107
109 static const std::string code_cert_validate;
111 static const std::string param_domain;
113 static const std::string param_cert;
115 static const std::string param_error_name;
117 static const std::string param_error_reason;
119 static const std::string param_error_cert;
121 static const std::string param_error_depth;
123 static const std::string param_proto_version;
125 static const std::string param_cipher;
126
127private:
129};
130
131}//namespace Ssl
132
133#endif // SQUID_SSL_CERT_VALIDATE_MESSAGE_H
134
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
std::string name
The certificate Id to use.
void setCert(X509 *)
Sets cert to the given certificate.
Security::CertPointer cert
A pointer to certificate.
static const std::string param_domain
Parameter name for passing intended domain name.
static const std::string param_proto_version
Parameter name for SSL version.
static const std::string param_error_name
Parameter name for passing the major SSL error.
static const std::string param_error_depth
Parameter name for passing the error depth.
static const std::string param_error_cert
Parameter name for passing the error cert ID.
void composeRequest(CertValidationRequest const &vcert)
static const std::string param_cipher
Parameter name for SSL cipher.
static const std::string param_cert
Parameter name for passing SSL certificates.
CertValidationMsg(MessageKind kind)
bool parseResponse(CertValidationResponse &resp)
Parse a response message and fill the resp object with parsed information.
X509 * getCertByName(std::vector< CertItem > const &, std::string const &name)
Search a CertItems list for the certificate with ID "name".
static const std::string param_error_reason
Parameter name for passing the error reason.
static const std::string code_cert_validate
String code for "cert_validate" messages.
void tryParsingResponse(CertValidationResponse &)
Security::SessionPointer ssl
Security::CertErrors * errors
The list of errors detected.
std::string domainName
The server name.
Security::ErrorCode error_no
The OpenSSL error code.
Security::CertPointer cert
The broken certificate.
std::string error_reason
A string describing the error.
void setCert(X509 *)
Sets cert to the given certificate.
static uint64_t MemoryUsedByResponse(const CertValidationResponse::Pointer &)
RefCount< CertValidationResponse > Pointer
Security::SessionPointer ssl
RecvdError & getError(int errorId)
std::vector< RecvdError > RecvdErrors
RecvdErrors errors
The list of parsed errors.
CertValidationResponse(const Security::SessionPointer &aSession)
Helper::ResultCode resultCode
The helper result code.
ResultCode
enumeration value for the helper response 'result' field.
Definition: ResultCode.h:16
@ Unknown
Definition: ResultCode.h:17
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:132
std::shared_ptr< SSL > SessionPointer
Definition: Session.h:49
Definition: Xaction.cc:40

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors