mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1178518 - Add an AppTrustedRoot for signed packaged app. r=keeler
This commit is contained in:
parent
077ea1aeb2
commit
e2da61623b
@ -16,6 +16,7 @@ const APP_TRUSTED_ROOTS= ["AppMarketplaceProdPublicRoot",
|
||||
"AppMarketplaceDevPublicRoot",
|
||||
"AppMarketplaceDevReviewersRoot",
|
||||
"AppMarketplaceStageRoot",
|
||||
"PrivilegedPackageRoot",
|
||||
"AppXPCShellRoot"];
|
||||
|
||||
this.TrustedRootCertificate = {
|
||||
|
@ -26,6 +26,8 @@
|
||||
// Add-on signing Certificates
|
||||
#include "addons-public.inc"
|
||||
#include "addons-stage.inc"
|
||||
// Privileged Package Certificates
|
||||
#include "privileged-package-root.inc"
|
||||
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
@ -94,6 +96,11 @@ AppTrustDomain::SetTrustedRoot(AppTrustedRoot trustedRoot)
|
||||
trustedDER.len = mozilla::ArrayLength(addonsStageRoot);
|
||||
break;
|
||||
|
||||
case nsIX509CertDB::PrivilegedPackageRoot:
|
||||
trustedDER.data = const_cast<uint8_t*>(privilegedPackageRoot);
|
||||
trustedDER.len = mozilla::ArrayLength(privilegedPackageRoot);
|
||||
break;
|
||||
|
||||
default:
|
||||
PR_SetError(SEC_ERROR_INVALID_ARGS, 0);
|
||||
return SECFailure;
|
||||
|
@ -37,6 +37,7 @@ array_names = [
|
||||
'xpcshellRoot',
|
||||
'addonsPublicRoot',
|
||||
'addonsStageRoot',
|
||||
'privilegedPackageRoot',
|
||||
]
|
||||
|
||||
for n in array_names:
|
||||
|
@ -34,6 +34,7 @@ headers_arrays_certs = [
|
||||
('xpcshell.inc', 'xpcshellRoot', test_ssl_path + '/test_signed_apps/trusted_ca1.der'),
|
||||
('addons-public.inc', 'addonsPublicRoot', 'addons-public.crt'),
|
||||
('addons-stage.inc', 'addonsStageRoot', 'addons-stage.crt'),
|
||||
('privileged-package-root.inc', 'privilegedPackageRoot', 'privileged-package-root.der'),
|
||||
]
|
||||
|
||||
for header, array_name, cert in headers_arrays_certs:
|
||||
|
BIN
security/apps/privileged-package-root.der
Normal file
BIN
security/apps/privileged-package-root.der
Normal file
Binary file not shown.
@ -46,7 +46,7 @@ interface nsIVerifySignedManifestCallback : nsISupports
|
||||
* This represents a service to access and manipulate
|
||||
* X.509 certificates stored in a database.
|
||||
*/
|
||||
[scriptable, uuid(3fe3702b-766b-47dd-8f77-c08c3a339a74)]
|
||||
[scriptable, uuid(0a47571d-602c-4b21-9f52-c3d0e681d83a)]
|
||||
interface nsIX509CertDB : nsISupports {
|
||||
|
||||
/**
|
||||
@ -318,6 +318,7 @@ interface nsIX509CertDB : nsISupports {
|
||||
const AppTrustedRoot AppXPCShellRoot = 6;
|
||||
const AppTrustedRoot AddonsPublicRoot = 7;
|
||||
const AppTrustedRoot AddonsStageRoot = 8;
|
||||
const AppTrustedRoot PrivilegedPackageRoot = 9;
|
||||
void openSignedAppFileAsync(in AppTrustedRoot trustedRoot,
|
||||
in nsIFile aJarFile,
|
||||
in nsIOpenSignedAppFileCallback callback);
|
||||
|
Loading…
x
Reference in New Issue
Block a user