Use CompOsKeyService as compsvc factory.
Define a Signer trait to encapsulate what we need to do to sign a
digest.
Modify compsvc to hold a signer.
Modify CompOsKeyService to be able to take in a keyblob and produce a
signer, then return a compsvc instance holding that signer.
This doesn't yet do anything with the signer. Eventually we will want
to use it to generate signatures on output artifacts.
Bug: 194267113
Test: atest ComposHostTestCases (with testOdrefesh un-ignored)
Change-Id: I72aead0280914987f7c8d1721c1e12ee0fad1af4
diff --git a/compos/src/compsvc_main.rs b/compos/src/compsvc_main.rs
index 111a819..9f12132 100644
--- a/compos/src/compsvc_main.rs
+++ b/compos/src/compsvc_main.rs
@@ -22,6 +22,7 @@
mod common;
mod compsvc;
+mod signer;
use crate::common::{SERVICE_NAME, VSOCK_PORT};
use anyhow::{bail, Context, Result};
@@ -59,7 +60,7 @@
);
let config = parse_args()?;
- let mut service = compsvc::new_binder(config.task_bin, config.debuggable).as_binder();
+ let mut service = compsvc::new_binder(config.task_bin, config.debuggable, None).as_binder();
if config.rpc_binder {
debug!("compsvc is starting as a rpc service.");
// SAFETY: Service ownership is transferring to the server and won't be valid afterward.