12 namespace extensions {
16 std::vector<Extension> clientExtensions;
17 if (
context_->getSupportedVersions().empty() ||
19 return clientExtensions;
25 return clientExtensions;
29 const std::vector<Extension>& extensions) {
30 auto serverParams = getExtension<TokenBindingParameters>(extensions);
31 if (!serverParams.hasValue()) {
32 VLOG(6) <<
"Server did not negotiate token binding";
35 if (serverParams->key_parameters_list.size() != 1) {
37 "Incorrect number of key_parameters sent by server",
40 if (serverParams->version >
context_->getSupportedVersions().front()) {
42 "Server sent higher tokbind version",
46 auto keyParam = std::find(
49 serverParams->key_parameters_list.front());
50 if (keyParam ==
context_->getKeyParams().end()) {
52 "Unsupported key parameter sent by server",
57 context_->getSupportedVersions().begin(),
58 context_->getSupportedVersions().end(),
59 serverParams->version);
61 VLOG(6) <<
"Server sent lower, unsupported, token binding version";
std::vector< Extension > getClientHelloExtensions() const override
TokenBindingProtocolVersion version
folly::Optional< TokenBindingKeyParameters > negotiatedKeyParam_
folly::Optional< TokenBindingProtocolVersion > negotiatedVersion_
void onEncryptedExtensions(const std::vector< Extension > &extensions) override
std::vector< TokenBindingKeyParameters > key_parameters_list
std::shared_ptr< TokenBindingContext > context_
Extension encodeExtension(const TokenBindingParameters ¶ms)