libdcp
|
A decrypted KDM. More...
#include <decrypted_kdm.h>
Public Member Functions | |
DecryptedKDM (EncryptedKDM const &kdm, std::string private_key) | |
DecryptedKDM (LocalTime not_valid_before, LocalTime not_valid_after, std::string annotation_text, std::string content_title_text, std::string issue_date) | |
DecryptedKDM (std::string cpl_id, std::map< std::shared_ptr< const ReelFileAsset >, Key > keys, LocalTime not_valid_before, LocalTime not_valid_after, std::string annotation_text, std::string content_title_text, std::string issue_date) | |
DecryptedKDM (std::shared_ptr< const CPL > cpl, Key key, LocalTime not_valid_before, LocalTime not_valid_after, std::string annotation_text, std::string content_title_text, std::string issue_date) | |
EncryptedKDM | encrypt (std::shared_ptr< const CertificateChain > signer, Certificate recipient, std::vector< std::string > trusted_devices, Formulation formulation, bool disable_forensic_marking_picture, boost::optional< int > disable_forensic_marking_audio) const |
void | add_key (boost::optional< std::string > type, std::string key_id, Key key, std::string cpl_id, Standard standard) |
void | add_key (DecryptedKDMKey key) |
std::vector< DecryptedKDMKey > | keys () const |
boost::optional< std::string > | annotation_text () const |
std::string | content_title_text () const |
std::string | issue_date () const |
Static Private Member Functions | |
static void | put_uuid (uint8_t **d, std::string id) |
static std::string | get_uuid (unsigned char **p) |
Private Attributes | |
LocalTime | _not_valid_before |
LocalTime | _not_valid_after |
boost::optional< std::string > | _annotation_text |
std::string | _content_title_text |
std::string | _issue_date |
std::vector< DecryptedKDMKey > | _keys |
Friends | |
class | ::decrypted_kdm_test |
A decrypted KDM.
This is a KDM that has either been decrypted by a target private key, or one which has been created (by some other means) ready for encryption later.
A DecryptedKDM object can be created either from an EncryptedKDM and private key file, or from the details of the assets that the KDM should protect.
Definition at line 75 of file decrypted_kdm.h.
DecryptedKDM::DecryptedKDM | ( | EncryptedKDM const & | kdm, |
std::string | private_key | ||
) |
kdm | Encrypted KDM. |
private_key | Private key as a PEM-format string. |
Definition at line 143 of file decrypted_kdm.cc.
DecryptedKDM::DecryptedKDM | ( | LocalTime | not_valid_before, |
LocalTime | not_valid_after, | ||
std::string | annotation_text, | ||
std::string | content_title_text, | ||
std::string | issue_date | ||
) |
Create an empty DecryptedKDM. After creation you must call add_key() to add each key that you want in the KDM.
not_valid_before | Start time for the KDM. |
not_valid_after | End time for the KDM. |
Definition at line 235 of file decrypted_kdm.cc.
DecryptedKDM::DecryptedKDM | ( | std::string | cpl_id, |
std::map< std::shared_ptr< const ReelFileAsset >, Key > | keys, | ||
LocalTime | not_valid_before, | ||
LocalTime | not_valid_after, | ||
std::string | annotation_text, | ||
std::string | content_title_text, | ||
std::string | issue_date | ||
) |
Construct a DecryptedKDM containing a given set of keys.
keys | Keys to be included in the DecryptedKDM. |
Definition at line 252 of file decrypted_kdm.cc.
DecryptedKDM::DecryptedKDM | ( | std::shared_ptr< const CPL > | cpl, |
Key | key, | ||
LocalTime | not_valid_before, | ||
LocalTime | not_valid_after, | ||
std::string | annotation_text, | ||
std::string | content_title_text, | ||
std::string | issue_date | ||
) |
Create a DecryptedKDM by taking a CPL and setting up to encrypt each of its assets with the same symmetric key.
cpl | CPL that the keys are for. |
key | Key that was used to encrypt the assets. |
not_valid_before | Start time for the KDM. |
not_valid_after | End time for the KDM. |
Definition at line 273 of file decrypted_kdm.cc.
void dcp::DecryptedKDM::add_key | ( | boost::optional< std::string > | type, |
std::string | key_id, | ||
Key | key, | ||
std::string | cpl_id, | ||
Standard | standard | ||
) |
EncryptedKDM DecryptedKDM::encrypt | ( | std::shared_ptr< const CertificateChain > | signer, |
Certificate | recipient, | ||
std::vector< std::string > | trusted_devices, | ||
Formulation | formulation, | ||
bool | disable_forensic_marking_picture, | ||
boost::optional< int > | disable_forensic_marking_audio | ||
) | const |
Encrypt this KDM's keys and sign the whole KDM.
signer | Chain to sign with. |
recipient | Certificate of the projector/server which should receive this KDM's keys. |
trusted_devices | Thumbprints of extra trusted devices which should be written to the KDM (recipient will be written as a trusted device automatically and does not need to be included in this list). |
formulation | Formulation to use for the encrypted KDM. |
disable_forensic_marking_picture | true to disable forensic marking of picture. |
disable_forensic_marking_audio | if not set, don't disable forensic marking of audio. If set to 0, disable all forensic marking; if set above 0, disable forensic marking above that channel. |
Definition at line 318 of file decrypted_kdm.cc.
|
inline |
Definition at line 158 of file decrypted_kdm.h.