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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/curve25519_key_exchange.cc
diff --git a/net/quic/crypto/curve25519_key_exchange.cc b/net/quic/crypto/curve25519_key_exchange.cc
index 88eb0537763d956ae2b048bb8aee9f99dcb56c64..f3d39e76001151853654a87316ea47ff72d3cdb9 100644
--- a/net/quic/crypto/curve25519_key_exchange.cc
+++ b/net/quic/crypto/curve25519_key_exchange.cc
@@ -25,11 +25,10 @@ Curve25519KeyExchange* Curve25519KeyExchange::New(
// We don't want to #include the NaCl headers in the public header file, so
// we use literals for the sizes of private_key_ and public_key_. Here we
// assert that those values are equal to the values from the NaCl header.
- COMPILE_ASSERT(
- sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
- header_out_of_sync);
- COMPILE_ASSERT(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
- header_out_of_sync);
+ static_assert(sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
+ "header out of sync");
+ static_assert(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
+ "header out of sync");
if (private_key.size() != crypto::curve25519::kScalarBytes) {
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698