Bug 1330138 - Differentiate prefs for u2f and webauthn apis; r=jcj r?baku
MozReview-Commit-ID: EUpleNqjFKQ
--- a/dom/webauthn/WebAuthentication.cpp
+++ b/dom/webauthn/WebAuthentication.cpp
@@ -8,18 +8,18 @@
#include "mozilla/dom/WebAuthnAssertion.h"
#include "mozilla/dom/WebAuthnAttestation.h"
#include "mozilla/dom/Promise.h"
#include "nsICryptoHash.h"
#include "pkix/Input.h"
#include "pkixutil.h"
-#define PREF_U2F_SOFTTOKEN_ENABLED "security.webauth.u2f_enable_softtoken"
-#define PREF_U2F_USBTOKEN_ENABLED "security.webauth.u2f_enable_usbtoken"
+#define PREF_WEBAUTHN_SOFTTOKEN_ENABLED "security.webauth.webauthn_enable_softtoken"
+#define PREF_WEBAUTHN_USBTOKEN_ENABLED "security.webauth.webauthn_enable_usbtoken"
namespace mozilla {
namespace dom {
static mozilla::LazyLogModule gWebauthLog("webauthn");
// Only needed for refcounted objects.
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WebAuthentication, mParent)
@@ -286,17 +286,17 @@ WebAuthentication::InitLazily()
// This only functions in e10s mode
// TODO: Remove in Bug 1323339
if (XRE_IsParentProcess()) {
MOZ_LOG(gWebauthLog, LogLevel::Debug,
("Is non-e10s Process, WebAuthn not available"));
return NS_ERROR_FAILURE;
}
- if (Preferences::GetBool(PREF_U2F_SOFTTOKEN_ENABLED)) {
+ if (Preferences::GetBool(PREF_WEBAUTHN_SOFTTOKEN_ENABLED)) {
if (!mAuthenticators.AppendElement(new NSSU2FTokenRemote(),
mozilla::fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
}
mInitialized = true;
return NS_OK;
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -377,11 +377,11 @@ partial interface Navigator {
#endif
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorConcurrentHardware {
readonly attribute unsigned long long hardwareConcurrency;
};
partial interface Navigator {
- [Pref="security.webauth.w3c", SameObject]
+ [Pref="security.webauth.webauthn", SameObject]
readonly attribute WebAuthentication authentication;
};
--- a/netwerk/base/security-prefs.js
+++ b/netwerk/base/security-prefs.js
@@ -88,17 +88,20 @@ pref("security.pki.netscape_step_up_poli
// Configures Certificate Transparency support mode:
// 0: Fully disabled.
// 1: Only collect telemetry. CT qualification checks are not performed.
pref("security.pki.certificate_transparency.mode", 1);
pref("security.webauth.u2f", false);
pref("security.webauth.u2f_enable_softtoken", false);
pref("security.webauth.u2f_enable_usbtoken", false);
-pref("security.webauth.w3c", false);
+
+pref("security.webauth.webauthn", false);
+pref("security.webauth.webauthn_enable_softtoken", false);
+pref("security.webauth.webauthn_enable_usbtoken", false);
pref("security.ssl.errorReporting.enabled", true);
pref("security.ssl.errorReporting.url", "https://incoming.telemetry.mozilla.org/submit/sslreports/");
pref("security.ssl.errorReporting.automatic", false);
// Impose a maximum age on HPKP headers, to avoid sites getting permanently
// blacking themselves out by setting a bad pin. (60 days by default)
// https://tools.ietf.org/html/rfc7469#section-4.1