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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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
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 197df6a1b91b349b62713a22eccdfeee3e8b8f80..63c355fa6f75ff46cedcf58581528daf5c66d116 100644
--- a/net/quic/crypto/p256_key_exchange_openssl.cc
+++ b/net/quic/crypto/p256_key_exchange_openssl.cc
@@ -20,7 +20,8 @@ P256KeyExchange::P256KeyExchange(EC_KEY* private_key, const uint8* public_key)
memcpy(public_key_, public_key, sizeof(public_key_));
}
-P256KeyExchange::~P256KeyExchange() {}
+P256KeyExchange::~P256KeyExchange() {
+}
// static
P256KeyExchange* P256KeyExchange::New(StringPiece key) {
@@ -40,8 +41,10 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
uint8 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,
- sizeof(public_key), NULL) != sizeof(public_key)) {
+ POINT_CONVERSION_UNCOMPRESSED,
+ public_key,
+ sizeof(public_key),
+ NULL) != sizeof(public_key)) {
DVLOG(1) << "Can't get public key.";
return NULL;
}
@@ -88,18 +91,21 @@ bool P256KeyExchange::CalculateSharedKey(const StringPiece& peer_public_value,
crypto::ScopedOpenSSL<EC_POINT, EC_POINT_free> point(
EC_POINT_new(EC_KEY_get0_group(private_key_.get())));
if (!point.get() ||
- !EC_POINT_oct2point( /* also test if point is on curve */
- EC_KEY_get0_group(private_key_.get()),
- point.get(),
- reinterpret_cast<const uint8*>(peer_public_value.data()),
- peer_public_value.size(), NULL)) {
+ !EC_POINT_oct2point(/* also test if point is on curve */
+ EC_KEY_get0_group(private_key_.get()),
+ point.get(),
+ reinterpret_cast<const uint8*>(
+ peer_public_value.data()),
+ peer_public_value.size(),
+ NULL)) {
DVLOG(1) << "Can't convert peer public value to curve point.";
return false;
}
uint8 result[kP256FieldBytes];
- if (ECDH_compute_key(result, sizeof(result), point.get(), private_key_.get(),
- NULL) != sizeof(result)) {
+ if (ECDH_compute_key(
+ result, sizeof(result), point.get(), private_key_.get(), NULL) !=
+ sizeof(result)) {
DVLOG(1) << "Can't compute ECDH shared key.";
return false;
}
@@ -113,7 +119,8 @@ StringPiece P256KeyExchange::public_value() const {
sizeof(public_key_));
}
-QuicTag P256KeyExchange::tag() const { return kP256; }
+QuicTag P256KeyExchange::tag() const {
+ return kP256;
+}
} // namespace net
-

Powered by Google App Engine
This is Rietveld 408576698