diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-25 11:39:07 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-01-25 15:20:42 +0000 |
commit | 6c91641271e536ffaa88a1dff5127e42ee99a91e (patch) | |
tree | 703d9dd49602377ddc90cbf886aad37913f2496b /chromium/net/quic/crypto/p256_key_exchange_openssl.cc | |
parent | b145b7fafd36f0c260d6a768c81fc14e32578099 (diff) | |
download | qtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz |
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources.
Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/net/quic/crypto/p256_key_exchange_openssl.cc')
-rw-r--r-- | chromium/net/quic/crypto/p256_key_exchange_openssl.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/chromium/net/quic/crypto/p256_key_exchange_openssl.cc b/chromium/net/quic/crypto/p256_key_exchange_openssl.cc index 88d45c8e4a2..7a9707e308d 100644 --- a/chromium/net/quic/crypto/p256_key_exchange_openssl.cc +++ b/chromium/net/quic/crypto/p256_key_exchange_openssl.cc @@ -15,7 +15,7 @@ using std::string; namespace net { -P256KeyExchange::P256KeyExchange(EC_KEY* private_key, const uint8* public_key) +P256KeyExchange::P256KeyExchange(EC_KEY* private_key, const uint8_t* public_key) : private_key_(private_key) { memcpy(public_key_, public_key, sizeof(public_key_)); } @@ -29,15 +29,15 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) { return nullptr; } - const uint8* keyp = reinterpret_cast<const uint8*>(key.data()); - crypto::ScopedEC_KEY private_key(d2i_ECPrivateKey(nullptr, &keyp, - key.size())); + const uint8_t* keyp = reinterpret_cast<const uint8_t*>(key.data()); + crypto::ScopedEC_KEY private_key( + d2i_ECPrivateKey(nullptr, &keyp, key.size())); if (!private_key.get() || !EC_KEY_check_key(private_key.get())) { DVLOG(1) << "Private key is invalid."; return nullptr; } - uint8 public_key[kUncompressedP256PointBytes]; + uint8_t public_key[kUncompressedP256PointBytes]; if (EC_POINT_point2oct(EC_KEY_get0_group(private_key.get()), EC_KEY_get0_public_key(private_key.get()), POINT_CONVERSION_UNCOMPRESSED, public_key, @@ -62,8 +62,8 @@ string P256KeyExchange::NewPrivateKey() { DVLOG(1) << "Can't convert private key to string"; return string(); } - scoped_ptr<uint8[]> private_key(new uint8[key_len]); - uint8* keyp = private_key.get(); + scoped_ptr<uint8_t[]> private_key(new uint8_t[key_len]); + uint8_t* keyp = private_key.get(); if (!i2d_ECPrivateKey(key.get(), &keyp)) { DVLOG(1) << "Can't convert private key to string."; return string(); @@ -89,14 +89,14 @@ bool P256KeyExchange::CalculateSharedKey(const StringPiece& peer_public_value, if (!point || !EC_POINT_oct2point(/* also test if point is on curve */ EC_KEY_get0_group(private_key_.get()), point.get(), - reinterpret_cast<const uint8*>( + reinterpret_cast<const uint8_t*>( peer_public_value.data()), peer_public_value.size(), nullptr)) { DVLOG(1) << "Can't convert peer public value to curve point."; return false; } - uint8 result[kP256FieldBytes]; + uint8_t result[kP256FieldBytes]; if (ECDH_compute_key(result, sizeof(result), point.get(), private_key_.get(), nullptr) != sizeof(result)) { DVLOG(1) << "Can't compute ECDH shared key."; @@ -112,6 +112,8 @@ StringPiece P256KeyExchange::public_value() const { sizeof(public_key_)); } -QuicTag P256KeyExchange::tag() const { return kP256; } +QuicTag P256KeyExchange::tag() const { + return kP256; +} } // namespace net |