Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Oct 15, 2024
1 parent 8c28103 commit ceeae59
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/decrypters/widevineandroid/WVCencSingleSampleDecrypter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,23 +420,22 @@ bool CWVCencSingleSampleDecrypterA::SendSessionMessage(const std::vector<uint8_t

int hdcpLimit{0};

if (!isCertRequest)
if (!licConfig.unwrapper.empty() && m_cdmAdapter->GetKeySystem() == DRM::KS_WIDEVINE)
{
// Unwrap license response
if (m_cdmAdapter->GetKeySystem() == DRM::KS_WIDEVINE)
std::string unwrappedData;
// Some services have a customized license server that require data to be wrapped with their formats (e.g. JSON).
// Here we provide a built-in way to unwrap the license data received, this avoid force add-ons to integrate
// a HTTP server proxy to manage the license data request/response, and so use Kodi properties to set wrappers.
if (!DRM::WvUnwrapLicense(licConfig.unwrapper, licConfig.unwrapperParams, respContentType,
respData, unwrappedData, hdcpLimit))
{
std::string unwrappedData;
// Some services have a customized license server that require data to be wrapped with their formats (e.g. JSON).
// Here we provide a built-in way to unwrap the license data received, this avoid force add-ons to integrate
// a HTTP server proxy to manage the license data request/response, and so use Kodi properties to set wrappers.
if (!DRM::WvUnwrapLicense(licConfig.unwrapper, licConfig.unwrapperParams, respContentType,
respData, unwrappedData, hdcpLimit))
{
return false;
}
respData = unwrappedData;
return false;
}

respData = unwrappedData;
}
if (!isCertRequest)
{
if (m_cdmAdapter->GetKeySystem() == DRM::KS_PLAYREADY &&
respData.find("<LicenseNonce>") == std::string::npos)
{
Expand Down

0 comments on commit ceeae59

Please sign in to comment.