[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-155.0a1-17.0-1] 2 commits: BB 45438: Use OneCRL dump from 153esr



Title: GitLab

ma1 pushed to branch tor-browser-155.0a1-17.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 3d646ccb
    by hackademix at 2026-11-05T18:25:12+01:00
    BB 45438: Use OneCRL dump from 153esr
    
  • 9f3470cb
    by Dana Keeler at 2026-11-05T18:25:35+01:00
    Bug 2084311 - ensure OneCRL bundle is loaded at init a=RyanVM
    
    Original Revision: https://phabricator.services.mozilla.com/D335790
    
    Differential Revision: https://phabricator.services.mozilla.com/D335837
    

4 changed files:

Changes:

  • security/manager/ssl/RemoteSecuritySettings.sys.mjs
    ... ... @@ -259,6 +259,28 @@ export var RemoteSecuritySettings = {
    259 259
           signerName: SECURITY_STATE_SIGNER,
    
    260 260
         });
    
    261 261
         this.OneCRLBlocklistClient.on("sync", updateCertBlocklist);
    
    262
    +    // Ensure the bundled list of revocations is loaded.
    
    263
    +    this.OneCRLBlocklistClient.get()
    
    264
    +      .then(records => {
    
    265
    +        return updateCertBlocklist({
    
    266
    +          data: {
    
    267
    +            current: records,
    
    268
    +            created: records,
    
    269
    +            updated: [],
    
    270
    +            deleted: [],
    
    271
    +          },
    
    272
    +        });
    
    273
    +      })
    
    274
    +      .catch(e => {
    
    275
    +        lazy.log.error(e);
    
    276
    +      })
    
    277
    +      .finally(() => {
    
    278
    +        // Only used by tests, to know when the bundled list is in cert_storage.
    
    279
    +        Services.obs.notifyObservers(
    
    280
    +          null,
    
    281
    +          "remote-security-settings:onecrl-bundle-loaded"
    
    282
    +        );
    
    283
    +      });
    
    262 284
     
    
    263 285
         this.IntermediatePreloadsClient = new IntermediatePreloads();
    
    264 286
     
    

  • security/manager/ssl/tests/unit/test_onecrl_loads_bundle.js
    1
    +// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
    
    2
    +// Any copyright is dedicated to the Public Domain.
    
    3
    +// http://creativecommons.org/publicdomain/zero/1.0/
    
    4
    +
    
    5
    +"use strict";
    
    6
    +
    
    7
    +// Checks that OneCRL loads its remote settings bundle at startup by ensuring
    
    8
    +// that each of the listed eMudhra intermediate certificates is revoked.
    
    9
    +
    
    10
    +do_get_profile();
    
    11
    +
    
    12
    +const { TestUtils } = ChromeUtils.importESModule(
    
    13
    +  "resource://testing-common/TestUtils.sys.mjs"
    
    14
    +);
    
    15
    +const { RemoteSecuritySettings } = ChromeUtils.importESModule(
    
    16
    +  "resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs"
    
    17
    +);
    
    18
    +
    
    19
    +// DER encoding of the issuer name (CN=emSign Root TLS CA - G3), base64.
    
    20
    +const ISSUER =
    
    21
    +  "MFYxCzAJBgNVBAYTAklOMSUwIwYDVQQKDBxlTXVkaHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMSAwHgYDVQQDDBdlbVNpZ24gUm9vdCBUTFMgQ0EgLSBHMw==";
    
    22
    +
    
    23
    +// Serial numbers are the contents of the DER INTEGER, in hex.
    
    24
    +const SERIALS = {
    
    25
    +  "EM DV TLS CA - G3B": "00a4aee678f23362b4c0e460b772f214",
    
    26
    +  "EM OV TLS CA - G3B": "6cada367fb1c100088120ea202d568",
    
    27
    +  "EM EV TLS CA - G3B": "00c7c41efe92d825f05eae841a4a82c1",
    
    28
    +  "EM DV TLS CA - G3C": "588b2e3c2bb8cda13e1a1209254321",
    
    29
    +  "EM OV TLS CA - G3C": "296926c227a3a1526392b19482a504",
    
    30
    +  "EM EV TLS CA - G3C": "008009928a64107601af05fa2f19f109",
    
    31
    +};
    
    32
    +
    
    33
    +function base64ToBytes(base64) {
    
    34
    +  return Array.from(atob(base64), c => c.charCodeAt(0));
    
    35
    +}
    
    36
    +
    
    37
    +function hexToBytes(hex) {
    
    38
    +  return hex.match(/../g).map(byte => parseInt(byte, 16));
    
    39
    +}
    
    40
    +
    
    41
    +add_task(async function test_emsign_intermediates_are_revoked() {
    
    42
    +  let loaded = TestUtils.topicObserved(
    
    43
    +    "remote-security-settings:onecrl-bundle-loaded"
    
    44
    +  );
    
    45
    +  RemoteSecuritySettings.init();
    
    46
    +  await loaded;
    
    47
    +
    
    48
    +  let certStorage = Cc["@mozilla.org/security/certstorage;1"].getService(
    
    49
    +    Ci.nsICertStorage
    
    50
    +  );
    
    51
    +  let issuer = base64ToBytes(ISSUER);
    
    52
    +
    
    53
    +  for (let [name, serial] of Object.entries(SERIALS)) {
    
    54
    +    Assert.equal(
    
    55
    +      certStorage.getRevocationState(issuer, hexToBytes(serial), [], []),
    
    56
    +      Ci.nsICertStorage.STATE_ENFORCE,
    
    57
    +      `${name} should be revoked`
    
    58
    +    );
    
    59
    +  }
    
    60
    +});

  • security/manager/ssl/tests/unit/xpcshell.toml
    ... ... @@ -293,6 +293,8 @@ run-sequentially = ["true"] # hardcoded ports
    293 293
     ["test_ocsp_url.js"]
    
    294 294
     run-sequentially = ["true"] # hardcoded ports
    
    295 295
     
    
    296
    +["test_onecrl_loads_bundle.js"]
    
    297
    +
    
    296 298
     ["test_oskeystore.js"]
    
    297 299
     skip-if = [
    
    298 300
       "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", # Bug 1729538
    

  • services/settings/dumps/security-state/onecrl.json The diff for this file was not included because it is too large.
  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx