[rkp] Add request/response for certificate request generation
This cl adds the request and response protocol for the
certificate request generation. It is needed by the
IRemotelyProvisionedComponent implementation in AVF.
Bug: 299256925
Test: atest rialto_test
Change-Id: I77833c24834c8e697b066dbb070b364dad626b6c
diff --git a/rialto/src/requests/api.rs b/rialto/src/requests/api.rs
index 05a386e..c4b2d8e 100644
--- a/rialto/src/requests/api.rs
+++ b/rialto/src/requests/api.rs
@@ -29,6 +29,10 @@
let res = rkp::generate_ecdsa_p256_key_pair()?;
Response::GenerateEcdsaP256KeyPair(res)
}
+ Request::GenerateCertificateRequest(p) => {
+ let res = rkp::generate_certificate_request(p)?;
+ Response::GenerateCertificateRequest(res)
+ }
};
Ok(response)
}