Bug 1635047 - Fix classification of Curve25519 KEA in telemetry. r=kjacobs,jcj

Differential Revision: https://phabricator.services.mozilla.com/D73606
This commit is contained in:
Benjamin Beurdouche 2020-05-06 16:36:05 +00:00
Родитель 57daed43ca
Коммит 55a58de0c2
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -885,10 +885,12 @@ static void AccumulateNonECCKeySize(Telemetry::HistogramID probe,
// named curves for a given size (e.g. secp256k1 vs. secp256r1). We punt on
// that for now. See also NSS bug 323674.
static void AccumulateECCCurve(Telemetry::HistogramID probe, uint32_t bits) {
unsigned int value = bits == 256 ? 23 // P-256
: bits == 384 ? 24 // P-384
: bits == 521 ? 25 // P-521
: 0; // Unknown
unsigned int value =
bits == 255 ? 29 // Curve25519
: bits == 256 ? 23 // P-256
: bits == 384 ? 24 // P-384
: bits == 521 ? 25 // P-521
: 0; // Unknown
Telemetry::Accumulate(probe, value);
}