- dcp::CertificateChain chain;
- chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/ca.self-signed.pem"))));
- chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/intermediate.signed.pem"))));
- chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/leaf.signed.pem"))));
-
- shared_ptr<dcp::Signer> signer (
- new dcp::Signer (
- chain,
- "test/ref/crypt/leaf.key"
- )
- );
+ shared_ptr<dcp::CertificateChain> signer (new dcp::CertificateChain ());
+ signer->add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/ca.self-signed.pem")));
+ signer->add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/intermediate.signed.pem")));
+ signer->add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/leaf.signed.pem")));
+ signer->set_key (dcp::file_to_string ("test/ref/crypt/leaf.key"));