| OLD | NEW |
| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 static QuicErrorCode ValidateClientHello( | 98 static QuicErrorCode ValidateClientHello( |
| 99 const CryptoHandshakeMessage& client_hello, | 99 const CryptoHandshakeMessage& client_hello, |
| 100 QuicVersion version, | 100 QuicVersion version, |
| 101 const QuicVersionVector& supported_versions, | 101 const QuicVersionVector& supported_versions, |
| 102 std::string* error_details); | 102 std::string* error_details); |
| 103 | 103 |
| 104 // Returns the name of the HandshakeFailureReason as a char* | 104 // Returns the name of the HandshakeFailureReason as a char* |
| 105 static const char* HandshakeFailureReasonToString( | 105 static const char* HandshakeFailureReasonToString( |
| 106 HandshakeFailureReason reason); | 106 HandshakeFailureReason reason); |
| 107 | 107 |
| 108 // Writes a hash of the serialized |message| into |output|. |
| 109 static void HashHandshakeMessage(const CryptoHandshakeMessage& message, |
| 110 std::string* output); |
| 111 |
| 108 private: | 112 private: |
| 109 DISALLOW_COPY_AND_ASSIGN(CryptoUtils); | 113 DISALLOW_COPY_AND_ASSIGN(CryptoUtils); |
| 110 }; | 114 }; |
| 111 | 115 |
| 112 } // namespace net | 116 } // namespace net |
| 113 | 117 |
| 114 #endif // NET_QUIC_CRYPTO_CRYPTO_UTILS_H_ | 118 #endif // NET_QUIC_CRYPTO_CRYPTO_UTILS_H_ |
| OLD | NEW |