diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-02-14 16:43:59 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-02-14 16:43:59 +0000 |
| commit | adb4f8a5014c3888f3322d1765fb0ee52b1d3169 (patch) | |
| tree | b8b06de0a2138d42efa44fa537a51492328d630a /src/decrypted_kdm.cc | |
| parent | b8ae635ba057c68eb1d883e62df353f73def3c57 (diff) | |
Extract KDM standard.
Diffstat (limited to 'src/decrypted_kdm.cc')
| -rw-r--r-- | src/decrypted_kdm.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc index 7113afb8..72070fe7 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -170,7 +170,7 @@ DecryptedKDM::DecryptedKDM (EncryptedKDM const & kdm, string private_key) /* 93 is not-valid-after (a string) [25 bytes] */ p += 25; /* 118 is the key [ASDCP::KeyLen bytes] */ - add_key (optional<string>(), key_id, Key (p), cpl_id); + add_key (optional<string>(), key_id, Key (p), cpl_id, INTEROP); break; } case 138: @@ -192,7 +192,7 @@ DecryptedKDM::DecryptedKDM (EncryptedKDM const & kdm, string private_key) /* 97 is not-valid-after (a string) [25 bytes] */ p += 25; /* 112 is the key [ASDCP::KeyLen bytes] */ - add_key (key_type, key_id, Key (p), cpl_id); + add_key (key_type, key_id, Key (p), cpl_id, SMPTE); break; } default: @@ -242,7 +242,7 @@ DecryptedKDM::DecryptedKDM ( , _issue_date (issue_date) { for (map<shared_ptr<const ReelMXF>, Key>::const_iterator i = keys.begin(); i != keys.end(); ++i) { - add_key (i->first->key_type(), i->first->key_id().get(), i->second, cpl_id); + add_key (i->first->key_type(), i->first->key_id().get(), i->second, cpl_id, SMPTE); } } @@ -266,7 +266,7 @@ DecryptedKDM::DecryptedKDM ( BOOST_FOREACH(shared_ptr<const ReelAsset> i, cpl->reel_assets ()) { shared_ptr<const ReelMXF> mxf = boost::dynamic_pointer_cast<const ReelMXF> (i); if (mxf && mxf->key_id ()) { - add_key (mxf->key_type(), mxf->key_id().get(), key, cpl->id ()); + add_key (mxf->key_type(), mxf->key_id().get(), key, cpl->id(), SMPTE); did_one = true; } } @@ -282,9 +282,9 @@ DecryptedKDM::DecryptedKDM ( * @param cpl_id ID of CPL that the key is for. */ void -DecryptedKDM::add_key (optional<string> type, string key_id, Key key, string cpl_id) +DecryptedKDM::add_key (optional<string> type, string key_id, Key key, string cpl_id, Standard standard) { - _keys.push_back (DecryptedKDMKey (type, key_id, key, cpl_id)); + _keys.push_back (DecryptedKDMKey (type, key_id, key, cpl_id, standard)); } void @@ -294,7 +294,9 @@ DecryptedKDM::add_key (DecryptedKDMKey key) } EncryptedKDM -DecryptedKDM::encrypt (shared_ptr<const CertificateChain> signer, Certificate recipient, vector<Certificate> trusted_devices, Formulation formulation) const +DecryptedKDM::encrypt ( + shared_ptr<const CertificateChain> signer, Certificate recipient, vector<Certificate> trusted_devices, Formulation formulation + ) const { list<pair<string, string> > key_ids; list<string> keys; |
