1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 const Ci = Components.interfaces;
8 const Cu = Components.utils;
10 this.EXPORTED_SYMBOLS = [
11 "TrustedRootCertificate"
14 const APP_TRUSTED_ROOTS= ["AppMarketplaceProdPublicRoot",
15 "AppMarketplaceProdReviewersRoot",
16 "AppMarketplaceDevPublicRoot",
17 "AppMarketplaceDevReviewersRoot",
18 "AppMarketplaceStageRoot",
19 "TrustedHostedAppPublicRoot",
20 "TrustedHostedAppTestRoot",
23 this.TrustedRootCertificate = {
24 _index: Ci.nsIX509CertDB.AppMarketplaceProdPublicRoot,
29 // aIndex should be one of the
30 // Ci.nsIX509CertDB AppTrustedRoot defined values
31 let found = APP_TRUSTED_ROOTS.some((trustRoot) => {
32 return Ci.nsIX509CertDB[trustRoot] === aIndex;