Skip to content

Commit

Permalink
[ClearKey] Allow only "cenc" encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Aug 19, 2024
1 parent 1db8623 commit 32eb73a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/decrypters/clearkey/ClearKeyDecrypter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "CompKodiProps.h"
#include "SrvBroker.h"
#include "decrypters/Helpers.h"
#include "utils/log.h"

std::vector<std::string_view> CClearKeyDecrypter::SelectKeySystems(std::string_view keySystem)
{
Expand Down Expand Up @@ -39,6 +40,12 @@ Adaptive_CencSingleSampleDecrypter* CClearKeyDecrypter::CreateSingleSampleDecryp
bool skipSessionMessage,
CryptoMode cryptoMode)
{
if (cryptoMode != CryptoMode::AES_CTR)
{
LOG::LogF(LOGERROR, "Cannot initialize ClearKey DRM. Only \"cenc\" encryption supported.");
return nullptr;
}

CClearKeyCencSingleSampleDecrypter* decrypter = nullptr;
auto& cfgLic = CSrvBroker::GetKodiProps().GetDrmConfig(std::string(DRM::KS_CLEARKEY)).license;

Expand Down

0 comments on commit 32eb73a

Please sign in to comment.