Skip to content
  • David Drysdale's avatar
    Support building for previous HAL versions · 1aa56372
    David Drysdale authored
    Add `hal_v2` and `hal_v3` features to the kmr_wire and kmr_hal crates,
    and gate inclusion of new enum variants and new trait entrypoints on
    these features.
    
    Add variant Soong targets for libkmr_wire and libkmr_hal that only
    enable some of these features (and turn them both on for the default
    targets).
    
    This necessitated a bit of a re-factoring of the code that emits the
    CDDL for the KeyParam type.
    
    Regenerate CDDL along the way, including a previous change.
    
    Add a message that the HAL sends to the TA at start of day to indicate
    what version of the HAL to support. (However, cope with an error
    response to allow the HAL service to be upgraded before the TA is.)
    
    Make the version used in attestations into a parameter, fed by the value
    sent by the HAL.
    
    So for a vendor to use the Rust reference implementation in (say) v1
    mode, they should just need to link the HAL service against
    libkmr_hal_v1 and libkmr_wire_hal_v1.
    
    Bug: 303836048
    Test: build new variants
    Test: VtsAidlKeyMintTargetTest
    Test: build CF using _hal_v[12] targets, run VTS
    Change-Id: Ia0bc48b36516af8720e1a907b977d7354c862a06
    1aa56372