diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e9eeea..c8a04af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,6 @@ find_package(WideVine REQUIRED) set(PLUGIN_SOURCES HostImplementation.cpp - DeviceCertificate.cpp MediaSession.cpp MediaSystem.cpp) diff --git a/DeviceCertificate.cpp b/DeviceCertificate.cpp deleted file mode 100644 index 8e83784..0000000 --- a/DeviceCertificate.cpp +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. - -#include "DeviceCertificate.h" - -const uint8_t kDeviceCert[] = { - 0x0A, 0x9A, 0x14, 0x08, 0x01, 0x10, 0x01, 0x1A, - 0x93, 0x14, 0x0A, 0xED, 0x09, 0x0A, 0xAE, 0x02, - 0x08, 0x02, 0x12, 0x10, 0x7F, 0x6F, 0x31, 0x50, - 0xB3, 0x73, 0x26, 0x2C, 0xBD, 0xC3, 0xB2, 0xDA, - 0xDE, 0x07, 0x5D, 0xBB, 0x18, 0xF3, 0xFA, 0xB0, - 0xA9, 0x05, 0x22, 0x8E, 0x02, 0x30, 0x82, 0x01, - 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xBF, 0xAF, - 0x84, 0xAC, 0x9C, 0x2D, 0x57, 0x4C, 0xDE, 0x10, - 0xB9, 0x94, 0xF0, 0x51, 0x4F, 0xBE, 0xA0, 0x0D, - 0xDC, 0x7E, 0x44, 0x38, 0x76, 0xD7, 0xB7, 0xBF, - 0x0B, 0x7C, 0x1A, 0x7A, 0x15, 0x9B, 0x66, 0xD1, - 0xE4, 0x67, 0x83, 0xA8, 0xE5, 0xFA, 0x11, 0xE3, - 0xEA, 0xB8, 0x84, 0xD8, 0x32, 0x9C, 0x8B, 0xA7, - 0xCC, 0x60, 0xBE, 0x68, 0x7C, 0x13, 0x29, 0xBD, - 0xF5, 0x8A, 0x6E, 0xFC, 0x7B, 0xAA, 0x4A, 0x72, - 0xB8, 0xB2, 0x52, 0xD8, 0xE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E, 0x98, - 0x14, 0x70, 0xEC, 0xBC, 0xB0, 0x48, 0xE5, 0x9E, - 0x56, 0x4F, 0xC3, 0xAD, 0x2C, 0x4B, 0x86, 0x0F, - 0x70, 0xAA, 0x46, 0x8F, 0xB6, 0x6C, 0x4A, 0x28, - 0x47, 0xEE, 0xC7, 0x55, 0xAD, 0xE8, 0x9B, 0xD6, - 0x22, 0x57, 0x40, 0xC9, 0xA5, 0x02, 0x03, 0x01, - 0x00, 0x01, 0x28, 0x99, 0x20, 0x30, 0x01, 0x12, - 0x80, 0x03, 0x21, 0x2D, 0xE1, 0x41, 0xC1, 0x30, - 0x57, 0xC1, 0x98, 0x72, 0x18, 0xDD, 0x7F, 0xBC, - 0x2D, 0xC9, 0xF8, 0x4C, 0x82, 0xF9, 0x1F, 0x5B, - 0x16, 0x3D, 0x03, 0x70, 0xC7, 0x06, 0x93, 0x87, - 0xC7, 0x0C, 0x90, 0xC3, 0x06, 0x0F, 0x05, 0x04, - 0x57, 0x3C, 0x6E, 0x0B, 0xD3, 0xAC, 0xB9, 0x84, - 0xFC, 0x3A, 0xB7, 0xB2, 0x21, 0xA7, 0x7D, 0x37, - 0x33, 0x32, 0x4D, 0x67, 0x0A, 0x9A, 0x5E, 0xEA, - 0x64, 0x69, 0x1D, 0x56, 0x66, 0xA9, 0xB6, 0x7D, - 0xD3, 0x67, 0x80, 0x3C, 0xD5, 0x75, 0x3B, 0xD7, - 0x5E, 0xA7, 0x23, 0x9B, 0xEC, 0x0C, 0x00, 0x82, - 0x97, 0x69, 0x57, 0x71, 0xCE, 0x20, 0x3C, 0x60, - 0x89, 0x8D, 0x4F, 0x26, 0x4A, 0xD5, 0x5D, 0x3D, - 0x01, 0xC9, 0x6F, 0x66, 0xD6, 0xFB, 0x6C, 0x53, - 0xD1, 0x92, 0x8A, 0x60, 0xAD, 0x04, 0x0D, 0x7D, - 0x48, 0xE9, 0xC8, 0x3D, 0x68, 0x49, 0xC2, 0x48, - 0xE4, 0x5C, 0x0F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 0xD3, 0x4B, 0x5E, 0x91, 0x6C, 0xD9, - 0x83, 0x5F, 0xB3, 0x0B, 0x47, 0x3E, 0x85, 0x18, - 0xE9, 0x2D, 0x8A, 0x33, 0xAE, 0x34, 0xF6, 0x58, - 0x54, 0x11, 0xDC, 0xD8, 0xC4, 0x6D, 0x7C, 0xAA, - 0x15, 0xCD, 0xCC, 0x17, 0x7A, 0xF2, 0x77, 0x57, - 0x5F, 0x40, 0xF8, 0x58, 0xF4, 0x96, 0xDF, 0x6E, - 0xFC, 0xB9, 0x70, 0x17, 0x08, 0x5B, 0x43, 0x29, - 0x4D, 0xD4, 0xA7, 0x6C, 0xDD, 0x8E, 0xC7, 0xFD, - 0x8D, 0xE9, 0xE1, 0xBA, 0x7E, 0xFF, 0x39, 0xE5, - 0x74, 0x79, 0x5E, 0x9A, 0x29, 0x2F, 0xC3, 0x0D, - 0xDD, 0x65, 0x1C, 0x2F, 0xBB, 0x3C, 0x50, 0x8F, - 0x5B, 0x47, 0x9A, 0x91, 0xEF, 0xC4, 0x0F, 0x7F, - 0xCD, 0x85, 0xBC, 0x7C, 0x41, 0x9C, 0x96, 0x59, - 0x17, 0x9B, 0x95, 0x3E, 0x26, 0x41, 0xDD, 0xE5, - 0xD1, 0x72, 0x85, 0x10, 0x05, 0x9C, 0xBF, 0x88, - 0x26, 0x29, 0xBE, 0x96, 0x6C, 0x0C, 0x36, 0x76, - 0xE8, 0x06, 0xC5, 0x04, 0xD9, 0x06, 0xA8, 0x79, - 0xF8, 0xEA, 0xF0, 0x60, 0xAF, 0x12, 0x20, 0xA8, - 0x98, 0xAD, 0x74, 0xB9, 0x6F, 0x94, 0xCA, 0xCB, - 0xDD, 0x9C, 0x4E, 0x62, 0xDF, 0xD1, 0x59, 0x3E, - 0x58, 0xEE, 0x82, 0xB9, 0xAD, 0x9E, 0xB7, 0x45, - 0x2C, 0x1F, 0x8C, 0x15, 0x77, 0xCC, 0xD2 -}; - -const size_t kDeviceCertSize = sizeof(kDeviceCert); - diff --git a/DeviceCertificate.h b/DeviceCertificate.h deleted file mode 100644 index dcba1ea..0000000 --- a/DeviceCertificate.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2020 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef WVCDM_CDM_WD_DEVICE_CERT_H_ -#define WVCDM_CDM_WD_DEVICE_CERT_H_ - -#include -#include - -extern const uint8_t kDeviceCert[]; -extern const size_t kDeviceCertSize; - -#endif // WVCDM_CDM_WD_DEVICE_CERT_H_ diff --git a/HostImplementation.cpp b/HostImplementation.cpp index bde4c98..5a8c60e 100644 --- a/HostImplementation.cpp +++ b/HostImplementation.cpp @@ -18,7 +18,6 @@ */ #include "HostImplementation.h" -#include "DeviceCertificate.h" using namespace widevine; using namespace WPEFramework; diff --git a/HostImplementation.h b/HostImplementation.h index 4b820a4..80dde09 100644 --- a/HostImplementation.h +++ b/HostImplementation.h @@ -23,6 +23,9 @@ #include "cdm.h" #include "override.h" +extern uint8_t* kDeviceCert; +extern size_t kDeviceCertSize; + #include namespace CDMi { diff --git a/MediaSystem.cpp b/MediaSystem.cpp index 6124309..41745a4 100644 --- a/MediaSystem.cpp +++ b/MediaSystem.cpp @@ -22,6 +22,12 @@ #include #include #include +#include + +uint8_t* kDeviceCert = nullptr; +size_t kDeviceCertSize = 0; + +using namespace WPEFramework; namespace CDMi { @@ -33,6 +39,24 @@ class WideVine : public IMediaKeys, public widevine::Cdm::IEventListener typedef std::map SessionMap; + class Config : public Core::JSON::Container { + public: + Config(const Config&) = delete; + Config& operator=(const Config&) = delete; + Config() + : Core::JSON::Container() + , KeyBox() + { + Add(_T("keybox"), &KeyBox); + } + ~Config() + { + } + + public: + Core::JSON::String KeyBox; + }; + public: WideVine() : _adminLock() @@ -86,6 +110,31 @@ class WideVine : public IMediaKeys, public widevine::Cdm::IEventListener if (_cdm != nullptr) { delete _cdm; } + + if (kDeviceCert != nullptr) { + delete [] kDeviceCert; + kDeviceCert = nullptr; + kDeviceCertSize = 0; + } + } + + void Initialize(const WPEFramework::PluginHost::IShell * shell, const std::string& configline) + { + Config config; + config.FromString(configline); + + if (config.KeyBox.IsSet() == true) { + Core::DataElementFile dataBuffer(config.KeyBox.Value(), Core::File::USER_READ); + + if(dataBuffer.IsValid() == false) { + TRACE_L1(_T("Failed to open %s"), config.KeyBox.Value().c_str()); + } else { + kDeviceCertSize = dataBuffer.Size(); + kDeviceCert = new uint8_t[kDeviceCertSize]; + + ::memcpy(kDeviceCert, dataBuffer.Buffer(), dataBuffer.Size()); + } + } } virtual CDMi_RESULT CreateMediaKeySession( diff --git a/tools/keybox/main.c b/tools/keybox/main.c deleted file mode 100644 index ed87e2e..0000000 --- a/tools/keybox/main.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2020 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include - -// This is a test keybox. It (and device certificates derived from it -// through provisioning) will not be accepted by production systems. - -static const uint32_t kKeyboxSystemId_Test = 4121; - -static const uint8_t kKeybox_Test[] = { - // Sample keybox used for test vectors - // deviceID - 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x30, // TestKey01 - 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - // key - 0xfb, 0xda, 0x04, 0x89, 0xa1, 0x58, 0x16, 0x0e, - 0xa4, 0x02, 0xe9, 0x29, 0xe3, 0xb6, 0x8f, 0x04, - // data - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x19, - 0x07, 0xd9, 0xff, 0xde, 0x13, 0xaa, 0x95, 0xc1, - 0x22, 0x67, 0x80, 0x53, 0x36, 0x21, 0x36, 0xbd, - 0xf8, 0x40, 0x8f, 0x82, 0x76, 0xe4, 0xc2, 0xd8, - 0x7e, 0xc5, 0x2b, 0x61, 0xaa, 0x1b, 0x9f, 0x64, - 0x6e, 0x58, 0x73, 0x49, 0x30, 0xac, 0xeb, 0xe8, - 0x99, 0xb3, 0xe4, 0x64, 0x18, 0x9a, 0x14, 0xa8, - 0x72, 0x02, 0xfb, 0x02, 0x57, 0x4e, 0x70, 0x64, - 0x0b, 0xd2, 0x2e, 0xf4, 0x4b, 0x2d, 0x7e, 0x39, - // magic - 0x6b, 0x62, 0x6f, 0x78, - // Crc - 0x0a, 0x7a, 0x2c, 0x35, -}; - -static const size_t kKeyboxSize_Test = 128; - -static const uint8_t kKeyboxValid02_Test[] = { - // Sample keybox used for test vectors - // deviceID - 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x30, // TestKey02 - 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - // key - 0x76, 0x5d, 0xce, 0x01, 0x04, 0x89, 0xb3, 0xd0, - 0xdf, 0xce, 0x54, 0x8a, 0x49, 0xda, 0xdc, 0xb6, - // data - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x19, - 0x92, 0x27, 0x0b, 0x1f, 0x1a, 0xd5, 0xc6, 0x93, - 0x19, 0x3f, 0xaa, 0x74, 0x1f, 0xdd, 0x5f, 0xb4, - 0xe9, 0x40, 0x2f, 0x34, 0xa4, 0x92, 0xf4, 0xae, - 0x9a, 0x52, 0x39, 0xbc, 0xb7, 0x24, 0x38, 0x13, - 0xab, 0xf4, 0x92, 0x96, 0xc4, 0x81, 0x60, 0x33, - 0xd8, 0xb8, 0x09, 0xc7, 0x55, 0x0e, 0x12, 0xfa, - 0xa8, 0x98, 0x62, 0x8a, 0xec, 0xea, 0x74, 0x8a, - 0x4b, 0xfa, 0x5a, 0x9e, 0xb6, 0x49, 0x0d, 0x80, - // magic - 0x6b, 0x62, 0x6f, 0x78, - // Crc - 0x2a, 0x3b, 0x3e, 0xe4, -}; - -static const uint8_t kKeyboxValid03_Test[] = { - // Sample keybox used for test vectors - // deviceID - 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x30, // TestKey03 - 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ - // key - 0x25, 0xe5, 0x2a, 0x02, 0x29, 0x68, 0x04, 0xa2, - 0x92, 0xfd, 0x7c, 0x67, 0x0b, 0x67, 0x1f, 0x31, - // data - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x19, - 0xf4, 0x0a, 0x0e, 0xa2, 0x0a, 0x71, 0xd5, 0x92, - 0xfa, 0xa3, 0x25, 0xc6, 0x4b, 0x76, 0xf1, 0x64, - 0xf4, 0x60, 0xa0, 0x30, 0x72, 0x23, 0xbe, 0x03, - 0xcd, 0xde, 0x7a, 0x06, 0xd4, 0x01, 0xeb, 0xdc, - 0xe0, 0x50, 0xc0, 0x53, 0x0a, 0x50, 0xb0, 0x37, - 0xe5, 0x05, 0x25, 0x0e, 0xa4, 0xc8, 0x5a, 0xff, - 0x46, 0x6e, 0xa5, 0x31, 0xf3, 0xdd, 0x94, 0xb7, - 0xe0, 0xd3, 0xf9, 0x04, 0xb2, 0x54, 0xb1, 0x64, - // magic - 0x6b, 0x62, 0x6f, 0x78, - // Crc - 0xa1, 0x99, 0x5f, 0x46, -}; - -int main(int argc, char** argv) { - FILE* outfile; - outfile = fopen("testkeybox.bin", "w"); - if (outfile == NULL) { return 0; } - if (fwrite(kKeybox_Test, 1, - kKeyboxSize_Test, outfile) != 128) { - fclose(outfile); - return -1; - } - if (fwrite(kKeyboxValid02_Test, 1, - kKeyboxSize_Test, outfile) != 128) { - fclose(outfile); - return -1; - } - fclose(outfile); - return (0); -} diff --git a/tools/keybox/testkeybox.bin b/tools/keybox/testkeybox.bin deleted file mode 100644 index 60d4d45..0000000 Binary files a/tools/keybox/testkeybox.bin and /dev/null differ