diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-30 02:10:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-30 02:10:09 +0100 |
| commit | 57b862d997857868d0c3c91a9776f854b62c6b56 (patch) | |
| tree | ed3bf26ba60645094853d05918bc22750bb356f7 /test/certificates_test.cc | |
| parent | d69d2d2d32b6f874cc13ecec1ce705d44a1feb24 (diff) | |
Merge Signer into CertificateChain.
Diffstat (limited to 'test/certificates_test.cc')
| -rw-r--r-- | test/certificates_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/certificates_test.cc b/test/certificates_test.cc index 3926c710..166ebb2d 100644 --- a/test/certificates_test.cc +++ b/test/certificates_test.cc @@ -19,7 +19,7 @@ #include <boost/test/unit_test.hpp> #include "certificate.h" -#include "signer.h" +#include "certificate_chain.h" #include "util.h" using std::list; @@ -141,11 +141,11 @@ BOOST_AUTO_TEST_CASE (signer_validation) chain.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/ca.self-signed.pem"))); chain.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/intermediate.signed.pem"))); chain.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/leaf.signed.pem"))); - dcp::Signer signer (chain, dcp::file_to_string ("test/ref/crypt/leaf.key")); - BOOST_CHECK (signer.valid ()); + chain.set_key (dcp::file_to_string ("test/ref/crypt/leaf.key")); + BOOST_CHECK (chain.valid ()); /* Put in an unrelated key and the signer should no longer be valid */ - dcp::Signer another_signer ("openssl"); - signer.set_key (another_signer.key ()); - BOOST_CHECK (!signer.valid ()); + dcp::CertificateChain another_chain ("openssl"); + chain.set_key (another_chain.key().get ()); + BOOST_CHECK (!chain.valid ()); } |
