• Maksim Moskvitin's avatar
    [Sync:USS] Support pending keys in keystore mode · 59635dd0
    Maksim Moskvitin authored
    In theory, keystore keys might not arrive together with
    NigoriSpecifics, for example, in case of throttling. To make USS
    implementation more robust in this situation, we allow pending keys in
    keystore mode. Cryptographer should be properly initialized once we
    receive keystore key, which was used for encryption of
    keystore_decryptor_token.
    
    This CL extends pending keys concept to keystore_decryptor_token,
    because we need to store it until decryption. Note: Directory
    implementation implicitly had this concept, since it stored
    NigoriSpecifics itself as the local state.
    
    Note: this CL doesn't add support for initialization of default Nigori
    in case bridge has no keystore keys.
    
    Bug: 922900
    Change-Id: I9a138d2190e28b617789bb0632d3751fa226d8d1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1840694
    Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#705063}
    59635dd0
nigori_state.h 2.76 KB