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

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

Issue 1459783002: Roll src/third_party/boringssl/src d7421ebf6..3ac32b1ed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 f3d39e76001151853654a87316ea47ff72d3cdb9..26149341af7bcd119c7708b187569dab27e4050b 100644
--- a/net/quic/crypto/curve25519_key_exchange.cc
+++ b/net/quic/crypto/curve25519_key_exchange.cc
@@ -67,10 +67,11 @@ bool Curve25519KeyExchange::CalculateSharedKey(
}
uint8 result[crypto::curve25519::kBytes];
- crypto::curve25519::ScalarMult(
- private_key_,
- reinterpret_cast<const uint8*>(peer_public_value.data()),
- result);
+ if (!crypto::curve25519::ScalarMult(
+ private_key_,
+ reinterpret_cast<const uint8*>(peer_public_value.data()), result)) {
+ return false;
+ }
out_result->assign(reinterpret_cast<char*>(result), sizeof(result));
return true;

Powered by Google App Engine
This is Rietveld 408576698