| 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_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ |
| 6 #define NET_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ | 6 #define NET_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <cstdint> |
| 9 | |
| 10 #include <memory> | |
| 11 #include <string> | 9 #include <string> |
| 12 | 10 |
| 13 #include "base/macros.h" | 11 #include "base/macros.h" |
| 14 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 15 #include "crypto/openssl_util.h" | |
| 16 #include "net/quic/core/crypto/key_exchange.h" | 13 #include "net/quic/core/crypto/key_exchange.h" |
| 17 #include "net/quic/platform/api/quic_export.h" | 14 #include "net/quic/platform/api/quic_export.h" |
| 18 #include "third_party/boringssl/src/include/openssl/base.h" | 15 #include "third_party/boringssl/src/include/openssl/base.h" |
| 19 | 16 |
| 20 namespace net { | 17 namespace net { |
| 21 | 18 |
| 22 // P256KeyExchange implements a KeyExchange using elliptic-curve | 19 // P256KeyExchange implements a KeyExchange using elliptic-curve |
| 23 // Diffie-Hellman on NIST P-256. | 20 // Diffie-Hellman on NIST P-256. |
| 24 class QUIC_EXPORT_PRIVATE P256KeyExchange : public KeyExchange { | 21 class QUIC_EXPORT_PRIVATE P256KeyExchange : public KeyExchange { |
| 25 public: | 22 public: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const uint8_t* public_key); | 56 const uint8_t* public_key); |
| 60 | 57 |
| 61 bssl::UniquePtr<EC_KEY> private_key_; | 58 bssl::UniquePtr<EC_KEY> private_key_; |
| 62 // The public key stored as an uncompressed P-256 point. | 59 // The public key stored as an uncompressed P-256 point. |
| 63 uint8_t public_key_[kUncompressedP256PointBytes]; | 60 uint8_t public_key_[kUncompressedP256PointBytes]; |
| 64 | 61 |
| 65 DISALLOW_COPY_AND_ASSIGN(P256KeyExchange); | 62 DISALLOW_COPY_AND_ASSIGN(P256KeyExchange); |
| 66 }; | 63 }; |
| 67 | 64 |
| 68 } // namespace net | 65 } // namespace net |
| 66 |
| 69 #endif // NET_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ | 67 #endif // NET_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_ |
| OLD | NEW |