am c28be299: Avoid multiple loads of Device RSA private key
* commit 'c28be299dc6579f29eb6c3872699232cc14bcf8c': Avoid multiple loads of Device RSA private key
This commit is contained in:
@@ -120,6 +120,7 @@ class CdmSession {
|
|||||||
|
|
||||||
// Used for certificate based licensing
|
// Used for certificate based licensing
|
||||||
std::string wrapped_key_;
|
std::string wrapped_key_;
|
||||||
|
bool is_certificate_loaded_;
|
||||||
|
|
||||||
std::set<WvCdmEventListener*> listeners_;
|
std::set<WvCdmEventListener*> listeners_;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ CdmSession::CdmSession(const CdmClientPropertySet* cdm_client_property_set)
|
|||||||
crypto_session_(NULL),
|
crypto_session_(NULL),
|
||||||
license_received_(false),
|
license_received_(false),
|
||||||
reinitialize_session_(false),
|
reinitialize_session_(false),
|
||||||
license_type_(kLicenseTypeStreaming) {
|
license_type_(kLicenseTypeStreaming),
|
||||||
|
is_certificate_loaded_(false) {
|
||||||
if (cdm_client_property_set) {
|
if (cdm_client_property_set) {
|
||||||
Properties::AddSessionPropertySet(session_id_, cdm_client_property_set);
|
Properties::AddSessionPropertySet(session_id_, cdm_client_property_set);
|
||||||
}
|
}
|
||||||
@@ -161,7 +162,11 @@ CdmResponseType CdmSession::GenerateKeyRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Properties::use_certificates_as_identification()) {
|
if (Properties::use_certificates_as_identification()) {
|
||||||
if (!crypto_session_->LoadCertificatePrivateKey(wrapped_key_)) {
|
if (is_certificate_loaded_ ||
|
||||||
|
crypto_session_->LoadCertificatePrivateKey(wrapped_key_)) {
|
||||||
|
is_certificate_loaded_ = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
reinitialize_session_ = true;
|
reinitialize_session_ = true;
|
||||||
return NEED_PROVISIONING;
|
return NEED_PROVISIONING;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user