| Index: net/quic/crypto/crypto_utils.h
|
| ===================================================================
|
| --- net/quic/crypto/crypto_utils.h (revision 184750)
|
| +++ net/quic/crypto/crypto_utils.h (working copy)
|
| @@ -8,47 +8,28 @@
|
| #define NET_QUIC_CRYPTO_CRYPTO_UTILS_H_
|
|
|
| #include <string>
|
| -#include <vector>
|
|
|
| #include "net/base/net_export.h"
|
| +#include "net/quic/crypto/crypto_protocol.h"
|
|
|
| namespace net {
|
|
|
| class QuicClock;
|
| class QuicRandom;
|
| -struct CryptoHandshakeMessage;
|
| -struct QuicCryptoConfig;
|
| -struct QuicCryptoNegotiatedParams;
|
|
|
| class NET_EXPORT_PRIVATE CryptoUtils {
|
| public:
|
| - // Encodes a single value as a string for CryptoTagValueMap.
|
| - template <class T>
|
| - static std::string EncodeSingleValue(const T& value) {
|
| - return std::string(reinterpret_cast<const char*>(&value), sizeof(value));
|
| - }
|
| + // FindMutualTag sets |out_result| to the first tag in |preference| that is
|
| + // also in |supported| and returns true. If there is no intersection between
|
| + // |preference| and |supported| it returns false.
|
| + static bool FindMutualTag(const CryptoTagVector& preference,
|
| + const CryptoTagVector& supported,
|
| + CryptoTag* out_result);
|
|
|
| - // Encodes a vector value as a string for CryptoTagValueMap.
|
| - template <class T>
|
| - static std::string EncodeVectorValue(const std::vector<T>& value) {
|
| - return std::string(reinterpret_cast<const char*>(&value[0]),
|
| - value.size() * sizeof(value[0]));
|
| - }
|
| -
|
| // Generates the connection nonce.
|
| static void GenerateNonce(const QuicClock* clock,
|
| QuicRandom* random_generator,
|
| std::string* nonce);
|
| -
|
| - static void FillClientHelloMessage(const QuicCryptoConfig& client_config,
|
| - const std::string& nonce,
|
| - const std::string& server_hostname,
|
| - CryptoHandshakeMessage* message);
|
| -
|
| - static void FillServerHelloMessage(
|
| - const QuicCryptoNegotiatedParams& negotiated_params,
|
| - const std::string& nonce,
|
| - CryptoHandshakeMessage* message);
|
| };
|
|
|
| } // namespace net
|
|
|