crtd_message.cc
Go to the documentation of this file.
96 size_t body_len = (static_cast<size_t>(buffer + len - current_pos) >= body_size - current_block.length())
168 void Ssl::CrtdMessage::composeBody(CrtdMessage::BodyParams const & map, std::string const & other_part)
210 if ((certProperties.signAlgorithm = Ssl::certSignAlgorithmId(i->second.c_str())) == Ssl::algSignEnd) {
222 if (!Ssl::readCertAndPrivateKeyFromMemory(certProperties.signWithX509, certProperties.signWithPkey, certs_part.c_str())) {
246 body += "\n" + Ssl::CrtdMessage::param_Sign + "=" + certSignAlgorithm(certProperties.signAlgorithm);
251 if (!Ssl::writeCertAndPrivateKeyToMemory(certProperties.signWithX509, certProperties.signWithPkey, certsPart))
262 const std::string Ssl::CrtdMessage::param_SetValidAfter(Ssl::CertAdaptAlgorithmStr[algSetValidAfter]);
263 const std::string Ssl::CrtdMessage::param_SetValidBefore(Ssl::CertAdaptAlgorithmStr[algSetValidBefore]);
264 const std::string Ssl::CrtdMessage::param_SetCommonName(Ssl::CertAdaptAlgorithmStr[algSetCommonName]);
static const std::string param_SetValidAfter
Parameter name for passing SetValidAfter cert adaptation variable.
Definition: crtd_message.h:80
bool appendCertToMemory(Security::CertPointer const &cert, std::string &bufferToWrite)
Definition: gadgets.cc:123
static const std::string param_host
Parameter name for passing hostname.
Definition: crtd_message.h:78
Definition: gadgets.h:231
Security::CertPointer ReadCertificate(const BIO_Pointer &)
Definition: gadgets.cc:816
Security::CertPointer signWithX509
Certificate to sign the generated request.
Definition: gadgets.h:236
void parseBody(BodyParams &map, std::string &other_part) const
Definition: crtd_message.cc:145
static const std::string param_SetValidBefore
Parameter name for passing SetValidBefore cert adaptation variable.
Definition: crtd_message.h:82
void composeBody(BodyParams const &map, std::string const &other_part)
Definition: crtd_message.cc:168
std::map< std::string, std::string > BodyParams
Definition: crtd_message.h:27
const std::string & getCode() const
Current response/request code. If parsing is not finished the method may return incompleted code.
Definition: crtd_message.cc:122
static const std::string code_new_certificate
String code for "new_certificate" messages.
Definition: crtd_message.h:76
Security::PrivateKeyPointer signWithPkey
The key of the signing certificate.
Definition: gadgets.h:237
void setCode(std::string const &aCode)
Set new request/reply code to compose.
Definition: crtd_message.cc:126
void composeRequest(Ssl::CertificateProperties const &)
Definition: crtd_message.cc:235
ParseResult parse(const char *buffer, size_t len)
Definition: crtd_message.cc:23
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
static const std::string param_Sign
Parameter name for passing signing algorithm.
Definition: crtd_message.h:86
CertSignAlgorithm certSignAlgorithmId(const char *sg)
Definition: gadgets.h:194
bool writeCertAndPrivateKeyToMemory(Security::CertPointer const &cert, Security::PrivateKeyPointer const &pkey, std::string &bufferToWrite)
Definition: gadgets.cc:99
void parseRequest(CertificateProperties &)
orchestrates entire request parsing
Definition: crtd_message.cc:181
bool setCommonName
Replace the CN field of the mimicking subject with the given.
Definition: gadgets.h:240
static const std::string param_SetCommonName
Parameter name for passing SetCommonName cert adaptation variable.
Definition: crtd_message.h:84
const std::string & getBody() const
Current body. If parsing is not finished the method returns incompleted body.
Definition: crtd_message.cc:120
bool readCertAndPrivateKeyFromMemory(Security::CertPointer &cert, Security::PrivateKeyPointer &pkey, char const *bufferToRead)
Definition: gadgets.cc:147
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products