#include "decrypted_kdm.h"
#include "util.h"
#include "exceptions.h"
-#include <boost/foreach.hpp>
#include <getopt.h>
using std::string;
int
main (int argc, char* argv[])
{
+ dcp::init ();
+
int option_index = 0;
while (true) {
struct option long_options[] = {
exit (EXIT_FAILURE);
}
- cout << dcp::Certificate(dcp::file_to_string(argv[optind])).thumbprint() << "\n";
+ try {
+ cout << dcp::Certificate(dcp::file_to_string(argv[optind])).thumbprint() << "\n";
+ } catch (boost::filesystem::filesystem_error& e) {
+ cerr << e.what() << "\n";
+ return -1;
+ }
+
return 0;
}