|
|
|
@ -3,14 +3,14 @@
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
#include <cryptopp/files.h>
|
|
|
|
|
#include "UpdateStream.hh"
|
|
|
|
|
#include "downloadclient.cc"
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
using namespace pEp::UpdateClient;
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
product p { "pEp for Something", "https://fdik.org/cgidownload?hash=23232323234242" };
|
|
|
|
|
UpdateStream us { UpdateDevice(p) };
|
|
|
|
|
|
|
|
|
@ -30,6 +30,20 @@ int main()
|
|
|
|
|
str << us.rdbuf();
|
|
|
|
|
cout << str.str() << "\n";
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
cout << "downloading...\n";
|
|
|
|
|
|
|
|
|
|
product p { "pEp for Something", "https://fdik.org/cgidownload?hash=23232323234242" };
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
string filename = update(p, "public.der");
|
|
|
|
|
cout << "downloaded " << filename << "\n";
|
|
|
|
|
}
|
|
|
|
|
catch (DownloadError&)
|
|
|
|
|
{
|
|
|
|
|
cout << "cannot download\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|