helper.cc
Go to the documentation of this file.
155 const std::unique_ptr<Ssl::GeneratorRequest> request(static_cast<Ssl::GeneratorRequest*>(data));
210 throw TextException(ToSBuf("Negative TTL in sslcrtvalidator_program ", Ssl::TheConfig.ssl_crt_validator,
272 Ssl::CertValidationResponse::Pointer validationResponse = new Ssl::CertValidationResponse(crtdvdData->ssl);
274 debugs(83, DBG_IMPORTANT, "ERROR: \"ssl_crtvd\" helper error response: " << reply.other().content());
279 } else if (replyMsg.parse(reply.other().content(), reply.other().contentSize()) != Ssl::CrtdMessage::OK ||
282 debugs(83, DBG_IMPORTANT, "ERROR: Certificate cannot be validated. ssl_crtvd response: " << replyMsg.getBody());
291 (validationResponse->resultCode == ::Helper::Okay || validationResponse->resultCode == ::Helper::Error)) {
299Ssl::CertValidationHelper::Submit(const Ssl::CertValidationRequest &request, const Callback &callback)
324 if (ssl_crt_validator && ssl_crt_validator->trySubmit(crtdvdData->query.c_str(), sslCrtvdHandleReplyWrapper, crtdvdData))
#define CBDATA_NAMESPACED_CLASS_INIT(namespace, type)
Definition: cbdata.h:328
Definition: ClpMap.h:41
Definition: Reply.h:30
static void Submit(const Ssl::CertValidationRequest &, const Callback &)
Submit crtd request message to external crtd server.
Definition: helper.cc:299
Definition: cert_validate_message.h:81
void composeRequest(CertValidationRequest const &vcert)
Definition: cert_validate_message.cc:38
bool parseResponse(CertValidationResponse &resp)
Parse a response message and fill the resp object with parsed information.
Definition: cert_validate_message.cc:93
static const std::string code_cert_validate
String code for "cert_validate" messages.
Definition: cert_validate_message.h:109
Definition: crtd_message.h:25
void setCode(std::string const &aCode)
Set new request/reply code to compose.
Definition: crtd_message.cc:126
std::string const & getBody() const
Current body. If parsing is not finished the method returns incompleted body.
Definition: crtd_message.cc:120
ParseResult parse(const char *buffer, size_t len)
Definition: crtd_message.cc:23
A pending Ssl::Helper request, combining the original and collapsed queries.
Definition: helper.cc:42
std::vector< GeneratorRequestor > GeneratorRequestors
Ssl::Helper request initiators waiting for the same answer (FIFO).
Definition: helper.cc:52
GeneratorRequestor(HLPCB *aCallback, void *aData)
Definition: helper.cc:36
static void Submit(CrtdMessage const &message, HLPCB *callback, void *data)
Submit crtd message to external crtd server.
Definition: helper.cc:124
Definition: cbdata.cc:38
Definition: helper.cc:255
Definition: Xaction.cc:40
std::unordered_map< SBuf, GeneratorRequest * > GeneratorRequests
Ssl::Helper query:GeneratorRequest map.
Definition: helper.cc:57
static void HandleGeneratorReply(void *data, const ::Helper::Reply &reply)
receives helper response
Definition: helper.cc:153
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
static Ssl::GeneratorRequests TheGeneratorRequests
pending Ssl::Helper requests (to all certificate generator helpers combined)
Definition: helper.cc:73
static void sslCrtvdHandleReplyWrapper(void *data, const ::Helper::Reply &reply)
Definition: helper.cc:266
static std::ostream & operator<<(std::ostream &os, const Ssl::GeneratorRequest &gr)
prints Ssl::GeneratorRequest for debugging
Definition: helper.cc:67