Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
bug 1351604 - don't ship DER.jsm and X509.jsm until they're actually …
Browse files Browse the repository at this point in the history
…used in production r=Cykesiopka

MozReview-Commit-ID: 2DlMrB5TfKU
  • Loading branch information
mozkeeler committed Mar 30, 2017
1 parent 2a8c5d7 commit dd0e019
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CLOBBER
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 1337331 - Required because of removed cc files like security/sandbox/chromium/base/threading/platform_thread_linux.cc
Bug 1351604 - required because DER.jsm and X509.jsm are no longer shipped with the browser
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ var whitelist = new Set([
{file: "resource://gre/modules/accessibility/AccessFu.jsm"},
// Bug 1351099
{file: "resource://gre/modules/addons/AddonLogging.jsm"},
// Bug 1351604
{file: "resource://gre/modules/psm/X509.jsm"},
// Bug 1351637
{file: "resource://gre/modules/sdk/bootstrap.js"},
// Bug 1351657
Expand Down
4 changes: 3 additions & 1 deletion security/manager/ssl/X509.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"use strict";

const Cu = Components.utils;
var { DER } = Cu.import("resource://gre/modules/psm/DER.jsm", {});
// Until DER.jsm is actually used in production code, this is where we have to
// import it from.
var { DER } = Cu.import("resource://testing-common/psm/DER.jsm", {});

const ERROR_UNSUPPORTED_ASN1 = "unsupported asn.1";
const ERROR_TIME_NOT_VALID = "Time not valid";
Expand Down
4 changes: 3 additions & 1 deletion security/manager/ssl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ if CONFIG['MOZ_XUL']:

XPIDL_MODULE = 'pipnss'

EXTRA_JS_MODULES.psm += [
# These aren't actually used in production code yet, so we don't want to
# ship them with the browser.
TESTING_JS_MODULES.psm += [
'DER.jsm',
'X509.jsm',
]
Expand Down
4 changes: 3 additions & 1 deletion security/manager/ssl/tests/unit/test_der.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

// Tests DER.jsm functionality.

var { DER } = Cu.import("resource://gre/modules/psm/DER.jsm", {});
// Until DER.jsm is actually used in production code, this is where we have to
// import it from.
var { DER } = Cu.import("resource://testing-common/psm/DER.jsm", {});

function run_simple_tests() {
throws(() => new DER.DER("this is not an array"), /invalid input/,
Expand Down
4 changes: 3 additions & 1 deletion security/manager/ssl/tests/unit/test_x509.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

// Tests X509.jsm functionality.

var { X509 } = Cu.import("resource://gre/modules/psm/X509.jsm", {});
// Until X509.jsm is actually used in production code, this is where we have to
// import it from.
var { X509 } = Cu.import("resource://testing-common/psm/X509.jsm", {});

function stringToBytes(s) {
let b = [];
Expand Down

0 comments on commit dd0e019

Please sign in to comment.