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:
@@ -41,6 +41,8 @@ namespace wvcdm {
|
||||
// Protobuf generated classes.
|
||||
using video_widevine::ClientIdentification;
|
||||
using video_widevine::ClientIdentification_ClientCapabilities;
|
||||
using video_widevine::
|
||||
ClientIdentification_ClientCapabilities_CertificateKeyType;
|
||||
using video_widevine::ClientIdentification_NameValue;
|
||||
using video_widevine::DrmDeviceCertificate;
|
||||
using video_widevine::EncryptedClientIdentification;
|
||||
@@ -95,7 +97,7 @@ static std::vector<CryptoKey> ExtractContentKeys(const License& license) {
|
||||
case kFourCcLittleEndianCbcs:
|
||||
key.set_cipher_mode(kCipherModeCbc);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
key.set_cipher_mode(kCipherModeCtr);
|
||||
break;
|
||||
}
|
||||
@@ -951,6 +953,20 @@ CdmResponseType CdmLicense::PrepareClientId(
|
||||
}
|
||||
}
|
||||
|
||||
CryptoSession::SupportedCertificateTypes supported_certs;
|
||||
if (crypto_session_->GetSupportedCertificateTypes(&supported_certs)) {
|
||||
if (supported_certs.rsa_2048_bit) {
|
||||
client_capabilities->add_supported_certificate_key_type(
|
||||
video_widevine::
|
||||
ClientIdentification_ClientCapabilities_CertificateKeyType_RSA_2048);
|
||||
}
|
||||
if (supported_certs.rsa_3072_bit) {
|
||||
client_capabilities->add_supported_certificate_key_type(
|
||||
video_widevine::
|
||||
ClientIdentification_ClientCapabilities_CertificateKeyType_RSA_3072);
|
||||
}
|
||||
}
|
||||
|
||||
client_capabilities->set_can_update_srm(
|
||||
crypto_session_->IsSrmUpdateSupported());
|
||||
uint16_t srm_version;
|
||||
|
||||
Reference in New Issue
Block a user