35 const std::list<folly::SSLContext::NextProtocolsItem>&
list);
42 template <
class TicketCipher>
44 const std::vector<std::string>& oldSecrets,
46 const std::vector<std::string>& newSecrets,
47 std::chrono::seconds validity,
49 std::vector<folly::ByteRange> ticketSecrets;
50 if (!currentSecret.empty()) {
53 for (
const auto&
secret : oldSecrets) {
56 for (
const auto&
secret : newSecrets) {
59 std::unique_ptr<TicketCipher>
cipher;
61 cipher = std::make_unique<TicketCipher>(
std::move(*pskContext));
63 cipher = std::make_unique<TicketCipher>();
65 cipher->setTicketSecrets(
std::move(ticketSecrets));
66 cipher->setValidity(validity);
static folly::ssl::EvpPkeyUniquePtr readPrivateKey(const std::string &filename, const std::string &passwordFilename)
constexpr detail::Map< Move > move
static std::vector< std::string > getAlpnsFromNpnList(const std::list< folly::SSLContext::NextProtocolsItem > &list)
static std::unique_ptr< TicketCipher > createTicketCipher(const std::vector< std::string > &oldSecrets, const std::string ¤tSecret, const std::vector< std::string > &newSecrets, std::chrono::seconds validity, folly::Optional< std::string > pskContext)
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
static std::vector< folly::ssl::X509UniquePtr > readChainFile(const std::string &filename)
Encoder::MutableCompressedList list
FOLLY_CPP14_CONSTEXPR bool hasValue() const noexcept
static folly::ssl::EvpPkeyUniquePtr decryptPrivateKey(const std::string &data, folly::PasswordInFile *pf)
static constexpr StringPiece secret
static constexpr uint64_t data[1]