cert_validate_message.cc
Go to the documentation of this file.
30 if (const auto certs = static_cast<STACK_OF(X509) *>(SSL_get_ex_data(ssl.get(), ssl_ex_index_ssl_cert_chain)))
193 throw TextException(ToSBuf("Incomplete response; missing error name from error_id: ", i->id), Here());
199Ssl::CertValidationMsg::getCertByName(std::vector<CertItem> const &certs, std::string const & name)
std::ostream & CurrentException(std::ostream &os)
prints active (i.e., thrown but not yet handled) exception
Definition: TextException.cc:88
static STACK_OF(X509) *PeerValidationCertificatesChain(const Security
Definition: cert_validate_message.cc:24
static int get_error_id(const char *label, size_t len)
Definition: cert_validate_message.cc:84
Definition: CbDataList.h:16
Definition: RefCount.h:28
static const std::string param_domain
Parameter name for passing intended domain name.
Definition: cert_validate_message.h:111
static const std::string param_proto_version
Parameter name for SSL version.
Definition: cert_validate_message.h:123
static const std::string param_error_name
Parameter name for passing the major SSL error.
Definition: cert_validate_message.h:115
static const std::string param_error_depth
Parameter name for passing the error depth.
Definition: cert_validate_message.h:121
static const std::string param_error_cert
Parameter name for passing the error cert ID.
Definition: cert_validate_message.h:119
void composeRequest(CertValidationRequest const &vcert)
Definition: cert_validate_message.cc:38
static const std::string param_cipher
Parameter name for SSL cipher.
Definition: cert_validate_message.h:125
static const std::string param_cert
Parameter name for passing SSL certificates.
Definition: cert_validate_message.h:113
bool parseResponse(CertValidationResponse &resp)
Parse a response message and fill the resp object with parsed information.
Definition: cert_validate_message.cc:93
X509 * getCertByName(std::vector< CertItem > const &, std::string const &name)
Search a CertItems list for the certificate with ID "name".
Definition: cert_validate_message.cc:199
static const std::string param_error_reason
Parameter name for passing the error reason.
Definition: cert_validate_message.h:117
static const std::string code_cert_validate
String code for "cert_validate" messages.
Definition: cert_validate_message.h:109
void tryParsingResponse(CertValidationResponse &)
Definition: cert_validate_message.cc:109
static uint64_t MemoryUsedByResponse(const CertValidationResponse::Pointer &)
Definition: cert_validate_message.cc:210
RecvdError & getError(int errorId)
Definition: cert_validate_message.cc:217
static const std::string param_host
Parameter name for passing hostname.
Definition: crtd_message.h:78
int ssl_ex_index_ssl_cert_chain
Security::ErrorCode GetErrorCode(const char *name)
The Security::ErrorCode code of the error described by "name".
Definition: ErrorDetail.h:30
std::unique_ptr< BIO, HardFun< void, BIO *, &BIO_vfree > > BIO_Pointer
Definition: gadgets.h:54
Security::CertPointer ReadCertificate(const BIO_Pointer &)
Definition: gadgets.cc:758
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:38
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63