• Maksim Ivanov's avatar
    Test for system cert token loading after TPM ready · d4e889aa
    Maksim Ivanov authored
    Add a browser test for the logic that triggers the system slot
    initialization whenever the TPM goes into the "ready" state as
    notified by cryptohomed (added in r698007).
    
    The test exercises the following codepath (this description
    skips some intermediate callers for the sake of brevity):
    1. SystemTokenCertDBInitializer is notified by the
       chromeos::[Fake]CryptohomeClient that TpmInitStatusUpdated
       with |ready|==true;
    2. chromeos::TPMTokenLoader::EnsureStarted() gets called;
    3. crypto::InitializeTPMTokenAndSystemSlot() gets called.
    
    This is verified by the test by opening a web page in the
    Chrome OS Login screen that uses client cert authentication.
    If the codepath mentioned above wouldn't work, the test would
    fail due to ClientCertFilterChromeOS waiting infinitely for
    the result from crypto::GetSystemNSSKeySlot().
    
    Bug: 725500
    Change-Id: I17e0fa42d3fda7d0deed5f86a2ab99b079865b36
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815857
    Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
    Reviewed-by: default avatarMatt Mueller <mattm@chromium.org>
    Reviewed-by: default avatarDavid Benjamin <davidben@chromium.org>
    Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
    Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#705243}
    d4e889aa
nss_util_internal.h 5.43 KB