36 std::chrono::milliseconds
after;
57 return supportedVersions_;
67 return supportedCiphers_;
74 supportedSigSchemes_ =
std::move(schemes);
77 return supportedSigSchemes_;
87 return supportedGroups_;
97 return supportedPskModes_;
104 clientAuthMode_ = authmode;
108 return clientAuthMode_;
117 versionFallbackEnabled_ = enabled;
120 return versionFallbackEnabled_;
135 const std::vector<std::string>& clientProtocols,
140 supportedAlpns_.begin(), supportedAlpns_.end(), *zeroRttAlpn) !=
141 supportedAlpns_.end()) {
144 return negotiate(supportedAlpns_, clientProtocols);
154 return ticketCipher_.get();
165 return cookieCipher_.get();
179 std::shared_ptr<const CertificateVerifier> verifier) {
180 clientCertVerifier_ =
std::move(verifier);
185 return clientCertVerifier_;
194 const std::vector<SignatureScheme>& peerSigSchemes)
const {
195 return certManager_->getCert(sni, supportedSigSchemes_, peerSigSchemes);
203 return certManager_->getCert(identity);
210 bool acceptEarlyData,
212 const std::shared_ptr<ReplayCache>& replayCache) {
213 acceptEarlyData_ = acceptEarlyData;
214 clockSkewTolerance_ = clockSkewTolerance;
215 replayCache_ = replayCache;
219 if (earlyDataFbOnly_ &&
227 return acceptEarlyData_;
230 return clockSkewTolerance_;
233 return replayCache_.get();
237 earlyDataFbOnly_ = fbOnly;
246 maxEarlyDataSize_ = maxEarlyDataSize;
249 return maxEarlyDataSize_;
259 return factory_.get();
270 sendNewSessionTicket_ = sendNewSessionTicket;
273 return sendNewSessionTicket_;
282 std::vector<CertificateCompressionAlgorithm> algos) {
283 supportedCompressionAlgos_ = algos;
286 return supportedCompressionAlgos_;
299 std::vector<std::vector<CipherSuite>> supportedCiphers_ = {
302 #if FOLLY_OPENSSL_IS_110 304 #endif // FOLLY_OPENSSL_IS_110 308 std::vector<SignatureScheme> supportedSigSchemes_ = {
313 std::vector<PskKeyExchangeMode> supportedPskModes_ = {
318 bool versionFallbackEnabled_{
false};
321 bool acceptEarlyData_{
false};
328 bool earlyDataFbOnly_{
false};
330 bool sendNewSessionTicket_{
true};
uint32_t getMaxEarlyDataSize() const
folly::Optional< std::pair< std::shared_ptr< SelfCert >, SignatureScheme > > getCert(const folly::Optional< std::string > &sni, const std::vector< SignatureScheme > &peerSigSchemes) const
const auto & getSupportedCompressionAlgorithms() const
const auto & getSupportedSigSchemes() const
void setEarlyDataSettings(bool acceptEarlyData, ClockSkewTolerance clockSkewTolerance, const std::shared_ptr< ReplayCache > &replayCache)
const auto & getSupportedPskModes() const
void setSupportedGroups(std::vector< NamedGroup > groups)
std::vector< std::string > supportedAlpns_
const TicketCipher * getTicketCipher() const
folly::Optional< T > negotiate(const std::vector< std::vector< T >> &serverPref, const std::vector< T > &clientPref)
constexpr detail::Map< Move > move
std::vector< CertificateCompressionAlgorithm > supportedCompressionAlgos_
const auto & getSupportedVersions() const
std::shared_ptr< ReplayCache > replayCache_
void setMaxEarlyDataSize(uint32_t maxEarlyDataSize)
std::shared_ptr< SelfCert > getCert(const std::string &identity) const
void setSupportedVersions(std::vector< ProtocolVersion > versions)
void setSendNewSessionTicket(bool sendNewSessionTicket)
void setVersionFallbackEnabled(bool enabled)
void setSupportedPskModes(std::vector< PskKeyExchangeMode > modes)
void setSupportedAlpns(std::vector< std::string > protocols)
ClockSkewTolerance clockSkewTolerance_
bool getAcceptEarlyData(ProtocolVersion version) const
folly::Optional< std::string > negotiateAlpn(const std::vector< std::string > &clientProtocols, const folly::Optional< std::string > &zeroRttAlpn) const
bool getSendNewSessionTicket() const
void setClientAuthMode(ClientAuthMode authmode)
const Factory * getFactory() const
void setTicketCipher(std::shared_ptr< TicketCipher > ticketCipher)
std::unique_ptr< Factory > factory_
void setFactory(std::unique_ptr< Factory > factory)
void setSupportedCiphers(std::vector< std::vector< CipherSuite >> ciphers)
const CookieCipher * getCookieCipher() const
std::shared_ptr< CookieCipher > cookieCipher_
ReplayCache * getReplayCache() const
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type make_unique(Args &&...args)
const std::shared_ptr< const CertificateVerifier > & getClientCertVerifier() const
std::chrono::milliseconds after
ClockSkewTolerance getClockSkewTolerance() const
ClientAuthMode getClientAuthMode() const
const auto & getSupportedCiphers() const
void setSupportedCompressionAlgorithms(std::vector< CertificateCompressionAlgorithm > algos)
void setCookieCipher(std::shared_ptr< CookieCipher > cookieCipher)
std::chrono::milliseconds before
std::shared_ptr< TicketCipher > ticketCipher_
void setEarlyDataFbOnly(bool fbOnly)
void setSupportedSigSchemes(std::vector< SignatureScheme > schemes)
const auto & getSupportedGroups() const
void setClientCertVerifier(std::shared_ptr< const CertificateVerifier > verifier)
bool getVersionFallbackEnabled() const
std::shared_ptr< const CertificateVerifier > clientCertVerifier_
std::unique_ptr< CertManager > certManager_
void setCertManager(std::unique_ptr< CertManager > manager)