Report 3072-bit Certificate Capability

(This is a merge of go/wvgerrit/23154)

This patch updates the ClientCapabilities protobuf to match the latest
on the server side and adds plumbing to the provisioning request
process so that devices can report whether they like big certs.

Their capacity to lie remains untested.

Bug: 34076937
Test: license_unittest
Change-Id: I3bcc9f1741146953d8bc0ff3d7d2305e7ac2c118
This commit is contained in:
John W. Bruce
2017-01-24 16:54:43 -08:00
parent f854794c50
commit 5249221e3a
5 changed files with 66 additions and 2 deletions

View File

@@ -1185,6 +1185,24 @@ bool CryptoSession::GetHdcpCapabilities(HdcpCapability* current,
return true;
}
bool CryptoSession::GetSupportedCertificateTypes(
SupportedCertificateTypes* support) {
LOGV("GetSupportedCertificateTypes: id=%ld", (uint32_t)oec_session_id_);
if (!initialized_) return false;
if (support == NULL) {
LOGE("CryptoSession::GetSupportedCertificateTypes: |support| cannot be "
"NULL");
return false;
}
uint32_t oec_support =
OEMCrypto_SupportedCertificates(requested_security_level_);
support->rsa_2048_bit = oec_support & OEMCrypto_Supports_RSA_2048bit;
support->rsa_3072_bit = oec_support & OEMCrypto_Supports_RSA_3072bit;
support->rsa_cast = oec_support & OEMCrypto_Supports_RSA_CAST;
return true;
}
bool CryptoSession::GetRandom(size_t data_length, uint8_t* random_data) {
if (random_data == NULL) {
LOGE("CryptoSession::GetRandom: random data destination not provided");