Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: net/quic/crypto/p256_key_exchange_openssl.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/p256_key_exchange_nss.cc ('k') | net/quic/crypto/proof_source_chromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/p256_key_exchange_openssl.cc
diff --git a/net/quic/crypto/p256_key_exchange_openssl.cc b/net/quic/crypto/p256_key_exchange_openssl.cc
index f5ca0633ea4c88bf46464d1e9402a9a35f21391f..7a9707e308d1a09483d5cfae8c0f6e3e0bb27701 100644
--- a/net/quic/crypto/p256_key_exchange_openssl.cc
+++ b/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,7 +29,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
return nullptr;
}
- const uint8* keyp = reinterpret_cast<const uint8*>(key.data());
+ 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())) {
@@ -37,7 +37,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
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.";
« no previous file with comments | « net/quic/crypto/p256_key_exchange_nss.cc ('k') | net/quic/crypto/proof_source_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698