зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1109245 - Modify test_keysize_ev.js to run on B2G. r=dkeeler
This commit is contained in:
Родитель
d5cdc68ca7
Коммит
7e1828ba3d
|
@ -18,6 +18,12 @@ let gIsWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
|
|||
const isDebugBuild = Cc["@mozilla.org/xpcom/debug;1"]
|
||||
.getService(Ci.nsIDebug2).isDebugBuild;
|
||||
|
||||
// The test EV roots are only enabled in debug builds as a security measure.
|
||||
//
|
||||
// Bug 1008316: B2G doesn't have EV enabled, so EV is not expected even in debug
|
||||
// builds.
|
||||
const gEVExpected = isDebugBuild && !("@mozilla.org/b2g-process-global;1" in Cc);
|
||||
|
||||
const SSS_STATE_FILE_NAME = "SiteSecurityServiceState.txt";
|
||||
|
||||
const SEC_ERROR_BASE = Ci.nsINSSErrorsService.NSS_SEC_ERROR_BASE;
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// XXX: The isDebugBuild tests you see are here because the test EV root is
|
||||
// only enabled for EV in debug builds, as a security measure. An ugly hack.
|
||||
//
|
||||
// Bug 1008316: B2G doesn't have EV enabled, so EV is not expected even in debug
|
||||
// builds.
|
||||
const gEVExpected = isDebugBuild && !("@mozilla.org/b2g-process-global;1" in Cc);
|
||||
|
||||
do_get_profile(); // must be called before getting nsIX509CertDB
|
||||
const certdb = Cc["@mozilla.org/security/x509certdb;1"]
|
||||
.getService(Ci.nsIX509CertDB);
|
||||
|
@ -33,7 +26,7 @@ let certList = [
|
|||
// Testing a root that looks like EV but is not EV enabled
|
||||
'int-non-ev-root',
|
||||
'non-ev-root',
|
||||
]
|
||||
];
|
||||
|
||||
function load_ca(ca_name) {
|
||||
var ca_filename = ca_name + ".der";
|
||||
|
|
|
@ -114,12 +114,12 @@ function checkForKeyType(keyType, inadequateKeySize, adequateKeySize) {
|
|||
// in such a build.
|
||||
let intFullName = intOKName + "-" + rootOKName;
|
||||
let eeFullName = eeOKName + "-" + intOKName + "-" + rootOKName;
|
||||
let expectedNamesForOCSP = isDebugBuild
|
||||
let expectedNamesForOCSP = gEVExpected
|
||||
? [ intFullName,
|
||||
eeFullName ]
|
||||
: [ eeFullName ];
|
||||
addKeySizeTestForEV(expectedNamesForOCSP, rootOKCertFileName,
|
||||
[ intFullName ], eeFullName, isDebugBuild);
|
||||
[ intFullName ], eeFullName, gEVExpected);
|
||||
|
||||
// Chain with a root cert that has an inadequate size for EV, but
|
||||
// adequate size for DV
|
||||
|
@ -133,7 +133,7 @@ function checkForKeyType(keyType, inadequateKeySize, adequateKeySize) {
|
|||
// adequate size for DV
|
||||
intFullName = intNotOKName + "-" + rootOKName;
|
||||
eeFullName = eeOKName + "-" + intNotOKName + "-" + rootOKName;
|
||||
expectedNamesForOCSP = isDebugBuild
|
||||
expectedNamesForOCSP = gEVExpected
|
||||
? [ intFullName ]
|
||||
: [ eeFullName ];
|
||||
addKeySizeTestForEV(expectedNamesForOCSP, rootOKCertFileName,
|
||||
|
|
|
@ -81,8 +81,6 @@ run-sequentially = hardcoded ports
|
|||
[test_keysize.js]
|
||||
[test_keysize_ev.js]
|
||||
run-sequentially = hardcoded ports
|
||||
# Bug 1008316: B2G doesn't have EV enabled
|
||||
skip-if = buildapp == "b2g"
|
||||
[test_cert_chains.js]
|
||||
run-sequentially = hardcoded ports
|
||||
[test_client_cert.js]
|
||||
|
|
Загрузка…
Ссылка в новой задаче