Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Unified Diff: net/quic/core/crypto/crypto_utils.cc

Issue 2907743003: Change CryptoHandshakeMessage::GetTaglist to tag a QuicTagVector* (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/core/crypto/crypto_utils.cc
diff --git a/net/quic/core/crypto/crypto_utils.cc b/net/quic/core/crypto/crypto_utils.cc
index 0e005bff26bfb7cfd33769a6c9a3317390f73b83..382acc720e4142b42d7d135565de1db7b8f1f274 100644
--- a/net/quic/core/crypto/crypto_utils.cc
+++ b/net/quic/core/crypto/crypto_utils.cc
@@ -188,17 +188,14 @@ QuicErrorCode CryptoUtils::ValidateServerHello(
return QUIC_INVALID_CRYPTO_MESSAGE_TYPE;
}
- const QuicTag* supported_version_tags;
- size_t num_supported_versions;
-
- if (server_hello.GetTaglist(kVER, &supported_version_tags,
- &num_supported_versions) != QUIC_NO_ERROR) {
+ QuicTagVector supported_version_tags;
+ if (server_hello.GetTaglist(kVER, &supported_version_tags) != QUIC_NO_ERROR) {
*error_details = "server hello missing version list";
return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
}
if (!negotiated_versions.empty()) {
- bool mismatch = num_supported_versions != negotiated_versions.size();
- for (size_t i = 0; i < num_supported_versions && !mismatch; ++i) {
+ bool mismatch = supported_version_tags.size() != negotiated_versions.size();
+ for (size_t i = 0; i < supported_version_tags.size() && !mismatch; ++i) {
mismatch = QuicTagToQuicVersion(supported_version_tags[i]) !=
negotiated_versions[i];
}

Powered by Google App Engine
This is Rietveld 408576698