#include <dcp/raw_convert.h>
#include <curl/curl.h>
#include <zip.h>
+#include <boost/algorithm/string.hpp>
using std::function;
using std::list;
using std::string;
+using namespace boost::algorithm;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
static void
try_dcp2000 (list<string>& urls, list<string>& files, string prefix, string serial)
{
+ urls.push_back(String::compose("%1%2xxx/Dolby-DCP2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial));
+ files.push_back(String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial));
+
+ urls.push_back(String::compose("%1%2xxx/Dolby-DCP2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial));
+ files.push_back(String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial));
+
+ urls.push_back(String::compose("%1%2xxx/Dolby-DCP2000-%3.certs.zip", prefix, serial.substr(0, 3), serial));
+ files.push_back(String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial));
+
urls.push_back (String::compose("%1%2xxx/dcp2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial));
files.push_back (String::compose("dcp2000-%1.cert.sha256.pem", serial));
void
DolbyDoremiCertificatePanel::do_download ()
{
- string const serial = wx_to_std (_serial->GetValue());
+ string serial = wx_to_std(_serial->GetValue());
+ trim(serial);
/* Try dcp2000, imb and ims prefixes (see mantis #375) */