I removed this in commit
6542fdd76c. It's not needed in
production, but it turns out it's very useful for testing VM start
times without having to reboot.
Bug: 220824234
Test: composd_cmd staged-apex-compile; compos_verify --instance pending
Change-Id: Ie38f70ca5a71b55bdb05ebdd437b2e55feb429b5
It took me more goes than it should have to figure out what I was
doing wrong, so add some context to these error messages.
Test: Builds
Change-Id: I9d1d38046fa1a3c787d280d2caf4e232cac13244
This fixes the issue where no log messages are produced by
compos_verify. Note that odsign already uses the System log, probably
for the same reason.
Bug: 215419883
Bug: 210919187
Test: Reboot after staged compile, see compos_verify logs
Change-Id: I86b0eda065c9154ae01a465aea7e724b746efa59
Delete a load of no longer needed code.
We no longer support persisting keys in the host. CompOS no longer
accesses DICE directly (compos_key_helper handles that).
We retain the instance image files, but rename pending to current
(it's created before reboot with the staged APEXes and used after
reboot with the current APEXes, but there's no point renaming it).
Remove the attempt to start an existing instance when running
compilation - it is slow, and vanishingly unlikely to work.
Sadly this also deletes all the CompOS unit tests. (But there are some
new ones in compos_key_tests.)
Bug: 218494522
Test: Manual; atest ComposTestCase; atest CompOsSigningHostTest
Change-Id: I0175270341d5dcad614106432b7d2650229cf8a6
Extend compos_helper to support signing, use it from CompOS.
Expose the public key from the VM. Rename compos_verify_key to
compos_verify and get it to verify the signature against the current
instance's public key.
Also move DICE access to compos_key_main. There's no use having it in
the library - neither the tests nor compos_verify can use it - and it
complicates the build rules.
There's a lot more that can be deleted, but I'll do that in a
follow-up; this is big enough already.
Bug: 218494522
Test: atest CompOsSigningHostTest CompOsDenialHostTest
Change-Id: I2d71f68a595d5ddadb2e7b16937fa6855f5db0ab