Bug 1539578 - Add telemetry for DH use in WebCrypto API r=keeler
Our WebCrypto implementation supports using DH as an algorithm in generateKey, which is not one of the recognized algorithms in the published specification [0]. We should seek to remove it from Firefox, but before we do, it'd be good to gather some telemetry on whether it's used at all, even in its' non-standard form. [0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview Differential Revision: https://phabricator.services.mozilla.com/D25291
This commit is contained in:
@@ -85,6 +85,7 @@ enum TelemetryAlgorithm {
|
||||
TA_PBKDF2 = 21,
|
||||
TA_ECDSA = 22,
|
||||
TA_HKDF = 23,
|
||||
TA_DH = 24,
|
||||
};
|
||||
|
||||
// Convenience functions for extracting / converting information
|
||||
@@ -2883,6 +2884,7 @@ class DeriveDhBitsTask : public ReturnArrayBufferViewTask {
|
||||
}
|
||||
|
||||
void Init(JSContext* aCx, const ObjectOrString& aAlgorithm, CryptoKey& aKey) {
|
||||
Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_DH);
|
||||
CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_DH);
|
||||
|
||||
// Check that we have a private key.
|
||||
|
||||
Reference in New Issue
Block a user