11 using namespace folly;
17 return CertificateCompressionAlgorithm::zlib;
23 throw std::runtime_error(
24 "Compressed certificate uses non-zlib algorithm: " +
29 throw std::runtime_error(
30 "Compressed certificate exceeds maximum certificate message size");
36 auto status = ::uncompress(
37 rawCertMessage->writableData(),
44 throw std::runtime_error(
"Uncompressed length incorrect");
48 throw std::runtime_error(
"Insufficient memory to decompress cert");
50 throw std::runtime_error(
51 "The uncompressed length given is too small to hold uncompressed data");
53 throw std::runtime_error(
54 "The compressed certificate data was incomplete or invalid");
56 throw std::runtime_error(
57 "Failed to decompress: " + to<std::string>(status));
59 rawCertMessage->append(size);
60 return decode<CertificateMsg>(
std::move(rawCertMessage));
folly::StringPiece toString(StateEnum state)
CertificateCompressionAlgorithm algorithm
CertificateCompressionAlgorithm
static std::unique_ptr< IOBuf > create(std::size_t capacity)
constexpr detail::Map< Move > move
uint32_t uncompressed_length
The non test part of the code is expected to have failures gtest_output_test_ cc
—— Concurrent Priority Queue Implementation ——
constexpr size_t kMaxHandshakeSize
constexpr auto size(C const &c) -> decltype(c.size())
Buf compressed_certificate_message