Merge branch 'bug_531_fixed_not_visible_parental_control_padlock'
[vuplus_dvbapp] / doc / TPM
1 The TPM check is currently to be considered a beta version. So please expect
2 code changes in the future.
3
4 If you'd like to write your own plugins and honor the efforts, Dream Multimedia
5 puts into developing Enigma 2, you can protect your plugin against execution
6 on Non-Dream Multimedia Hardware by implementing a TPM (Trusted Platform Module)
7 check into your plugin.
8 For ease of use we provide a demo plugin in lib/python/Plugins/DemoPlugins/TPMDemo.
9
10 The main TPM check is implemented into the "main" function. You need to provide
11 this code yourself in your plugin. So copy&paste the code into your own as well
12 as the needed functions
13 - bin2long
14 - long2bin
15 - rsa_pub1024
16 - decrypt_block
17 - validate_cert
18 - read_random
19 Importing the functions from somewhere else would spoil the security model. So
20 you need to provide the code with your plugin.
21  
22 You can either use the given method using the main function (which will run the
23 TPM check each time the plugin is called) or directly use it in the
24 Plugins(**kwargs) function and not return the Plugins-list if the TPM check failes
25 (which will prevent the plugin from showing up at all). You can also implement
26 a warning message for all possible TPM failure scenarios.
27