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

Unified Diff: net/quic/core/crypto/p256_key_exchange.cc

Issue 2566783002: Various formatting cleanups to net/quic/crypto and net/quic/congestion_control (Closed)
Patch Set: Rebase Created 4 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/core/crypto/p256_key_exchange.h ('k') | net/quic/core/crypto/p256_key_exchange_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/p256_key_exchange.cc
diff --git a/net/quic/core/crypto/p256_key_exchange.cc b/net/quic/core/crypto/p256_key_exchange.cc
index bfef92476c82ea55e207d371fb21ae6e399f0af4..62a58903354f479fa223d1b9df0bdec499cfb4e9 100644
--- a/net/quic/core/crypto/p256_key_exchange.cc
+++ b/net/quic/core/crypto/p256_key_exchange.cc
@@ -4,11 +4,15 @@
#include "net/quic/core/crypto/p256_key_exchange.h"
+#include <cstdint>
+#include <memory>
+#include <string>
#include <utility>
#include "base/logging.h"
#include "third_party/boringssl/src/include/openssl/ec.h"
#include "third_party/boringssl/src/include/openssl/ecdh.h"
+#include "third_party/boringssl/src/include/openssl/err.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
using base::StringPiece;
@@ -88,7 +92,7 @@ bool P256KeyExchange::CalculateSharedKey(StringPiece peer_public_value,
bssl::UniquePtr<EC_POINT> point(
EC_POINT_new(EC_KEY_get0_group(private_key_.get())));
- if (!point ||
+ 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_t*>(
« no previous file with comments | « net/quic/core/crypto/p256_key_exchange.h ('k') | net/quic/core/crypto/p256_key_exchange_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698