Validate Service Certificates Before Accepting Them
(This is a merge of http://go/wvgerrit/14630) To create a better flow when an application sets a service certificate manually, we will now validate the certificate when it is given to us, and if it is invalid, we will not allow the property to be set. Bug: 21307186 Change-Id: If980ad075604223fc962a859fae93e98d86a7f4f
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "cdm_client_property_set.h"
|
||||
#include "cdm_engine.h"
|
||||
#include "initialization_data.h"
|
||||
#include "license.h"
|
||||
#include "log.h"
|
||||
#include "properties.h"
|
||||
#include "wv_cdm_constants.h"
|
||||
@@ -37,6 +38,11 @@ bool WvContentDecryptionModule::IsWebm(const std::string& init_data_type) {
|
||||
return InitializationData(init_data_type).is_webm();
|
||||
}
|
||||
|
||||
bool WvContentDecryptionModule::IsValidServiceCertificate(
|
||||
const std::string& certificate) {
|
||||
return CdmLicense::VerifySignedServiceCertificate(certificate) == NO_ERROR;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::OpenSession(
|
||||
const CdmKeySystem& key_system, CdmClientPropertySet* property_set,
|
||||
const std::string& origin, WvCdmEventListener* event_listener,
|
||||
|
||||
Reference in New Issue
Block a user