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

Side by Side Diff: net/quic/crypto/crypto_utils.h

Issue 1413613016: Factoring a QuicCryptoServerStreamBase API out of QuicCryptoServerStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106845547
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Some helpers for quic crypto 5 // Some helpers for quic crypto
6 6
7 #ifndef NET_QUIC_CRYPTO_CRYPTO_UTILS_H_ 7 #ifndef NET_QUIC_CRYPTO_CRYPTO_UTILS_H_
8 #define NET_QUIC_CRYPTO_CRYPTO_UTILS_H_ 8 #define NET_QUIC_CRYPTO_CRYPTO_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Validates that |server_hello| is actually an SHLO message and that it is 78 // Validates that |server_hello| is actually an SHLO message and that it is
79 // not part of a downgrade attack. 79 // not part of a downgrade attack.
80 // 80 //
81 // Returns QUIC_NO_ERROR if this is the case or returns the appropriate error 81 // Returns QUIC_NO_ERROR if this is the case or returns the appropriate error
82 // code and sets |error_details|. 82 // code and sets |error_details|.
83 static QuicErrorCode ValidateServerHello( 83 static QuicErrorCode ValidateServerHello(
84 const CryptoHandshakeMessage& server_hello, 84 const CryptoHandshakeMessage& server_hello,
85 const QuicVersionVector& negotiated_versions, 85 const QuicVersionVector& negotiated_versions,
86 std::string* error_details); 86 std::string* error_details);
87 87
88 // Validates that |client_hello| is actually a CHLO and that this is not part
89 // of a downgrade attack.
90 // This includes verifiying versions and detecting downgrade attacks.
91 //
92 // Returns QUIC_NO_ERROR if this is the case or returns the appropriate error
93 // code and sets |error_details|.
94 static QuicErrorCode ValidateClientHello(
95 const CryptoHandshakeMessage& client_hello,
96 QuicVersion version,
97 const QuicVersionVector& supported_versions,
98 std::string* error_details);
99
88 private: 100 private:
89 DISALLOW_COPY_AND_ASSIGN(CryptoUtils); 101 DISALLOW_COPY_AND_ASSIGN(CryptoUtils);
90 }; 102 };
91 103
92 } // namespace net 104 } // namespace net
93 105
94 #endif // NET_QUIC_CRYPTO_CRYPTO_UTILS_H_ 106 #endif // NET_QUIC_CRYPTO_CRYPTO_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698