diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/encrypted_kdm.cc | 7 | ||||
| -rw-r--r-- | src/encrypted_kdm.h | 6 | ||||
| -rw-r--r-- | src/util.h | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc index d7cdd8dd..93852fb6 100644 --- a/src/encrypted_kdm.cc +++ b/src/encrypted_kdm.cc @@ -484,10 +484,11 @@ public: } } -EncryptedKDM::EncryptedKDM (boost::filesystem::path file) - : _data (new data::EncryptedKDMData (shared_ptr<cxml::Node> (new cxml::Document ("DCinemaSecurityMessage", file)))) +EncryptedKDM::EncryptedKDM (string s) { - + shared_ptr<cxml::Document> doc (new cxml::Document ("DCinemaSecurityMessage")); + doc->read_string (s); + _data = new data::EncryptedKDMData (doc); } EncryptedKDM::EncryptedKDM ( diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h index 0d459d5a..1fcd37f4 100644 --- a/src/encrypted_kdm.h +++ b/src/encrypted_kdm.h @@ -52,11 +52,7 @@ class Certificate; class EncryptedKDM { public: - /** Read a KDM from an XML file. - * @param file XML file to read. - */ - EncryptedKDM (boost::filesystem::path file); - + EncryptedKDM (std::string); EncryptedKDM (EncryptedKDM const & kdm); EncryptedKDM & operator= (EncryptedKDM const &); ~EncryptedKDM (); @@ -88,7 +88,7 @@ extern void add_signer (xmlpp::Element* parent, CertificateChain const & certifi extern int base64_decode (std::string const & in, unsigned char* out, int out_length); extern boost::optional<boost::filesystem::path> relative_to_root (boost::filesystem::path root, boost::filesystem::path file); extern FILE * fopen_boost (boost::filesystem::path, std::string); -extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 4096); +extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 65536); extern std::string private_key_fingerprint (std::string key); template <class F, class T> |
