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

Unified Diff: nss/lib/freebl/ec.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: 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
Index: nss/lib/freebl/ec.c
diff --git a/nss/lib/freebl/ec.c b/nss/lib/freebl/ec.c
index 6af242dc108337804da3073c9aa35cf29c9ad18a..4435f91eaa3b257697f5afa8b5630f9804cab88b 100644
--- a/nss/lib/freebl/ec.c
+++ b/nss/lib/freebl/ec.c
@@ -543,6 +543,15 @@ ECDH_Derive(SECItem *publicValue,
return SECFailure;
}
+ /*
+ * We fail if the public value is the point at infinity, since
+ * this produces predictable results.
+ */
+ if (ec_point_at_infinity(publicValue)) {
Ryan Sleevi 2015/12/11 01:26:14 Of interest
davidben 2015/12/11 22:10:58 Pretty sure this was a no-op since then pointQ wou
+ PORT_SetError(SEC_ERROR_BAD_KEY);
+ return SECFailure;
+ }
+
MP_DIGITS(&k) = 0;
memset(derivedSecret, 0, sizeof *derivedSecret);
len = (ecParams->fieldID.size + 7) >> 3;

Powered by Google App Engine
This is Rietveld 408576698