X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fcertificates_test.cc;h=690afa774a6c6c19f6e64667b218c88c1516562c;hb=77726c718ccce4af4bc82c3695a13cea859df874;hp=ba29549b345df9bc107a811fe280d5178f898228;hpb=8d6c3c9ae554430582dcb016897e87f6d04d5d78;p=libdcp.git diff --git a/test/certificates_test.cc b/test/certificates_test.cc index ba29549b..690afa77 100644 --- a/test/certificates_test.cc +++ b/test/certificates_test.cc @@ -17,17 +17,23 @@ */ +#include +#include "certificates.h" + +using std::list; +using boost::shared_ptr; + BOOST_AUTO_TEST_CASE (certificates) { - libdcp::CertificateChain c; + dcp::CertificateChain c; - c.add (shared_ptr (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/ca.self-signed.pem")))); - c.add (shared_ptr (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/intermediate.signed.pem")))); - c.add (shared_ptr (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/leaf.signed.pem")))); + c.add (shared_ptr (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/ca.self-signed.pem")))); + c.add (shared_ptr (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/intermediate.signed.pem")))); + c.add (shared_ptr (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/leaf.signed.pem")))); - list > leaf_to_root = c.leaf_to_root (); + list > leaf_to_root = c.leaf_to_root (); - list >::iterator i = leaf_to_root.begin (); + list >::iterator i = leaf_to_root.begin (); /* Leaf */ BOOST_CHECK_EQUAL (*i, c.leaf ()); @@ -72,6 +78,6 @@ BOOST_AUTO_TEST_CASE (certificates) ); /* Check that reconstruction from a string works */ - libdcp::Certificate test (c.root()->certificate (true)); + dcp::Certificate test (c.root()->certificate (true)); BOOST_CHECK_EQUAL (test.certificate(), c.root()->certificate()); }