sock->clientHelloInfo_->
clientHelloSigAlgs_.emplace_back(hashAlg, sigAlg);
}
+ } else if (extensionType == ssl::TLSExtension::SUPPORTED_VERSIONS) {
+ cursor.skip(1);
+ extensionDataLength -= 1;
+ while (extensionDataLength) {
+ sock->clientHelloInfo_->clientHelloSupportedVersions_.push_back(
+ cursor.readBE<uint16_t>());
+ extensionDataLength -= 2;
+ }
} else {
cursor.skip(extensionDataLength);
}
return sigAlgs;
}
+std::string AsyncSSLSocket::getSSLClientSupportedVersions() const {
+ if (!parseClientHello_) {
+ return "";
+ }
+ return folly::join(":", clientHelloInfo_->clientHelloSupportedVersions_);
+}
+
std::string AsyncSSLSocket::getSSLAlertsReceived() const {
std::string ret;
std::string getSSLClientSigAlgs() const;
+ /**
+ * Get the list of versions in the supported versions extension (used to
+ * negotiate TLS 1.3).
+ */
+ std::string getSSLClientSupportedVersions() const;
+
std::string getSSLAlertsReceived() const;
/**
ENCRYPT_THEN_MAC = 22,
EXTENDED_MASTER_SECRET = 23,
SESSION_TICKET = 35,
+ SUPPORTED_VERSIONS = 43,
// Facebook-specific, not IANA assigned yet
TLS_CACHED_INFO_FB = 60001,
// End Facebook-specific
std::vector<uint8_t> clientHelloCompressionMethods_;
std::vector<TLSExtension> clientHelloExtensions_;
std::vector<std::pair<HashAlgorithm, SignatureAlgorithm>> clientHelloSigAlgs_;
+ std::vector<uint16_t> clientHelloSupportedVersions_;
};
} // ssl