зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330138 - Differentiate prefs for u2f and webauthn apis; r=jcj r=baku
MozReview-Commit-ID: EUpleNqjFKQ
This commit is contained in:
Родитель
14bcecc66f
Коммит
78bed400fd
|
@ -13,8 +13,8 @@
|
|||
#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 {
|
||||
|
@ -291,7 +291,7 @@ WebAuthentication::InitLazily()
|
|||
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;
|
||||
|
|
|
@ -36,9 +36,9 @@ function expectTypeError(aResult) {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.w3c", true],
|
||||
["security.webauth.u2f_enable_softtoken", true],
|
||||
["security.webauth.u2f_enable_usbtoken", false]]},
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
isnot(navigator.authentication, undefined, "WebAuthn API endpoint must exist");
|
||||
isnot(navigator.authentication.makeCredential, undefined, "WebAuthn makeCredential API endpoint must exist");
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
// Execute the full-scope test
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.w3c", true],
|
||||
["security.webauth.u2f_enable_softtoken", true],
|
||||
["security.webauth.u2f_enable_usbtoken", false]]},
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
isnot(navigator.authentication, undefined, "WebAuthn API endpoint must exist");
|
||||
isnot(navigator.authentication.makeCredential, undefined, "WebAuthn makeCredential API endpoint must exist");
|
||||
|
|
|
@ -46,9 +46,9 @@ function expectNotSupportedError(aResult) {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.w3c", true],
|
||||
["security.webauth.u2f_enable_softtoken", true],
|
||||
["security.webauth.u2f_enable_usbtoken", false]]},
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
isnot(navigator.authentication, undefined, "WebAuthn API endpoint must exist");
|
||||
isnot(navigator.authentication.makeCredential, undefined, "WebAuthn makeCredential API endpoint must exist");
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
// Execute the full-scope test
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.w3c", true],
|
||||
["security.webauth.u2f_enable_softtoken", false],
|
||||
["security.webauth.u2f_enable_usbtoken", false]]},
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
isnot(navigator.authentication, undefined, "WebAuthn API endpoint must exist");
|
||||
isnot(navigator.authentication.makeCredential, undefined, "WebAuthn makeCredential API endpoint must exist");
|
||||
|
|
|
@ -49,9 +49,9 @@ function keepThisScopedCredential(aScopedCredInfo) {
|
|||
return Promise.resolve(aScopedCredInfo);
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.w3c", true],
|
||||
["security.webauth.u2f_enable_softtoken", true],
|
||||
["security.webauth.u2f_enable_usbtoken", false]]},
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
isnot(navigator.authentication, undefined, "WebAuthn API endpoint must exist");
|
||||
isnot(navigator.authentication.makeCredential, undefined,
|
||||
|
|
|
@ -382,6 +382,6 @@ interface NavigatorConcurrentHardware {
|
|||
};
|
||||
|
||||
partial interface Navigator {
|
||||
[Pref="security.webauth.w3c", SameObject]
|
||||
[Pref="security.webauth.webauthn", SameObject]
|
||||
readonly attribute WebAuthentication authentication;
|
||||
};
|
||||
|
|
|
@ -93,7 +93,10 @@ 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/");
|
||||
|
|
Загрузка…
Ссылка в новой задаче