Report OEMCrypto security patch level
[ Merge of http://go/wvgerrit/17959 ] This will allow the license server to base licensing decisions on the devices security module revision. b/28882058 Change-Id: I574e7686bb305397946d2bfaff504cfae242e628
This commit is contained in:
@@ -35,6 +35,7 @@ class CryptoSession {
|
|||||||
virtual bool GetApiVersion(uint32_t* version);
|
virtual bool GetApiVersion(uint32_t* version);
|
||||||
virtual bool GetSystemId(uint32_t* system_id);
|
virtual bool GetSystemId(uint32_t* system_id);
|
||||||
virtual bool GetProvisioningId(std::string* provisioning_id);
|
virtual bool GetProvisioningId(std::string* provisioning_id);
|
||||||
|
virtual uint8_t GetSecurityPatchLevel();
|
||||||
|
|
||||||
virtual CdmResponseType Open() { return Open(kLevelDefault); }
|
virtual CdmResponseType Open() { return Open(kLevelDefault); }
|
||||||
virtual CdmResponseType Open(SecurityLevel requested_security_level);
|
virtual CdmResponseType Open(SecurityLevel requested_security_level);
|
||||||
|
|||||||
@@ -234,6 +234,10 @@ bool CryptoSession::GetProvisioningId(std::string* provisioning_id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t CryptoSession::GetSecurityPatchLevel() {
|
||||||
|
return OEMCrypto_Security_Patch_Level(requested_security_level_);
|
||||||
|
}
|
||||||
|
|
||||||
CdmResponseType CryptoSession::Open(SecurityLevel requested_security_level) {
|
CdmResponseType CryptoSession::Open(SecurityLevel requested_security_level) {
|
||||||
LOGV("CryptoSession::Open: Lock");
|
LOGV("CryptoSession::Open: Lock");
|
||||||
AutoLock auto_lock(crypto_lock_);
|
AutoLock auto_lock(crypto_lock_);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "license.h"
|
#include "license.h"
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "clock.h"
|
#include "clock.h"
|
||||||
@@ -25,6 +26,7 @@ std::string kProductNameKey = "product_name";
|
|||||||
std::string kBuildInfoKey = "build_info";
|
std::string kBuildInfoKey = "build_info";
|
||||||
std::string kDeviceIdKey = "device_id";
|
std::string kDeviceIdKey = "device_id";
|
||||||
std::string kWVCdmVersionKey = "widevine_cdm_version";
|
std::string kWVCdmVersionKey = "widevine_cdm_version";
|
||||||
|
std::string kOemCryptoSecurityPatchLevelKey = "oem_crypto_security_patch_level";
|
||||||
const unsigned char kServiceCertificateCAPublicKey[] = {
|
const unsigned char kServiceCertificateCAPublicKey[] = {
|
||||||
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81, 0x00, 0xb4, 0xfe, 0x39,
|
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81, 0x00, 0xb4, 0xfe, 0x39,
|
||||||
0xc3, 0x65, 0x90, 0x03, 0xdb, 0x3c, 0x11, 0x97, 0x09, 0xe8, 0x68, 0xcd,
|
0xc3, 0x65, 0x90, 0x03, 0xdb, 0x3c, 0x11, 0x97, 0x09, 0xe8, 0x68, 0xcd,
|
||||||
@@ -994,6 +996,11 @@ CdmResponseType CdmLicense::PrepareClientId(
|
|||||||
client_info->set_name(kWVCdmVersionKey);
|
client_info->set_name(kWVCdmVersionKey);
|
||||||
client_info->set_value(value);
|
client_info->set_value(value);
|
||||||
}
|
}
|
||||||
|
client_info = client_id->add_client_info();
|
||||||
|
client_info->set_name(kOemCryptoSecurityPatchLevelKey);
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << (uint32_t)session_->GetSecurityPatchLevel();
|
||||||
|
client_info->set_value(ss.str());
|
||||||
|
|
||||||
ClientIdentification_ClientCapabilities* client_capabilities =
|
ClientIdentification_ClientCapabilities* client_capabilities =
|
||||||
client_id->mutable_client_capabilities();
|
client_id->mutable_client_capabilities();
|
||||||
|
|||||||
Reference in New Issue
Block a user