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 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
| 13 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
12 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
13 #include "net/quic/quic_protocol.h" | 16 #include "net/quic/quic_protocol.h" |
14 | 17 |
15 namespace net { | 18 namespace net { |
16 | 19 |
17 class CommonCertSets; | 20 class CommonCertSets; |
18 class KeyExchange; | 21 class KeyExchange; |
19 class QuicDecrypter; | 22 class QuicDecrypter; |
20 class QuicEncrypter; | 23 class QuicEncrypter; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 18, | 79 SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 18, |
77 // The source-address token has expired. | 80 // The source-address token has expired. |
78 SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 19, | 81 SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 19, |
79 | 82 |
80 // The expected leaf certificate hash could not be validated. | 83 // The expected leaf certificate hash could not be validated. |
81 INVALID_EXPECTED_LEAF_CERTIFICATE = 21, | 84 INVALID_EXPECTED_LEAF_CERTIFICATE = 21, |
82 | 85 |
83 MAX_FAILURE_REASON = 22, | 86 MAX_FAILURE_REASON = 22, |
84 }; | 87 }; |
85 | 88 |
86 // These errors will be packed into an uint32 and we don't want to set the most | 89 // These errors will be packed into an uint32_t and we don't want to set the |
| 90 // most |
87 // significant bit, which may be misinterpreted as the sign bit. | 91 // significant bit, which may be misinterpreted as the sign bit. |
88 static_assert(MAX_FAILURE_REASON <= 32, "failure reason out of sync"); | 92 static_assert(MAX_FAILURE_REASON <= 32, "failure reason out of sync"); |
89 | 93 |
90 // A CrypterPair contains the encrypter and decrypter for an encryption level. | 94 // A CrypterPair contains the encrypter and decrypter for an encryption level. |
91 struct NET_EXPORT_PRIVATE CrypterPair { | 95 struct NET_EXPORT_PRIVATE CrypterPair { |
92 CrypterPair(); | 96 CrypterPair(); |
93 ~CrypterPair(); | 97 ~CrypterPair(); |
94 scoped_ptr<QuicEncrypter> encrypter; | 98 scoped_ptr<QuicEncrypter> encrypter; |
95 scoped_ptr<QuicDecrypter> decrypter; | 99 scoped_ptr<QuicDecrypter> decrypter; |
96 }; | 100 }; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 192 |
189 const CommonCertSets* common_cert_sets; | 193 const CommonCertSets* common_cert_sets; |
190 | 194 |
191 private: | 195 private: |
192 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig); | 196 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig); |
193 }; | 197 }; |
194 | 198 |
195 } // namespace net | 199 } // namespace net |
196 | 200 |
197 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 201 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
OLD | NEW |