Skip to content
  • Matthijs Mekking's avatar
    Start testing keytiming metadata · f8e34b57
    Matthijs Mekking authored
    This commit adds testing keytiming metadata.  In order to facilitate
    this, the kasp system test undergoes a few changes:
    
    1. When finding a key file, rather than only saving the key ID,
       also save the base filename and creation date with `key_save`.
       These can be used later to set expected key times.
    2. Add a test function `set_addkeytime` that takes a key, which
       keytiming to update, a datetime in keytiming format, and a number
       (seconds) to add, and sets the new time in the given keytime
       parameter of the given key.  This is used to set the expected key
       times.
    3. Split `check_keys` in `check_keys` and `check_keytimes`.  First we
       need to find the keyfile before we can check the keytimes.
       We need to retrieve the creation date (and sometimes other
       keytimes) to determine the other expected key times.
    4. Add helper functions to set the expected key times per policy.
       This avoids lots of duplication.
    
    Check for keytimes for the first test cases (all that do not cover
    rollovers).
    f8e34b57