diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-18 13:12:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-18 13:12:41 +0100 |
| commit | 5ea52a08f45b0cb8b8fe7221244cdcdeeaca0ed7 (patch) | |
| tree | ff9b2d893caa5a1d2914b52e98112f22fb96bdec /src/lib/util.cc | |
| parent | 684da6bed46635f72d93c57a8721b63aa7e10ed5 (diff) | |
Keep signing certificates / keys in config.xml rather than on disk; allow configuration.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 837f3cdf3..c7ef40a1c 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -791,59 +791,6 @@ tidy_for_filename (string f) return t; } -shared_ptr<const dcp::Signer> -make_signer () -{ - boost::filesystem::path const sd = Config::instance()->signer_chain_directory (); - - /* Remake the chain if any of it is missing */ - - list<boost::filesystem::path> files; - files.push_back ("ca.self-signed.pem"); - files.push_back ("intermediate.signed.pem"); - files.push_back ("leaf.signed.pem"); - files.push_back ("leaf.key"); - - list<boost::filesystem::path>::const_iterator i = files.begin(); - while (i != files.end()) { - boost::filesystem::path p (sd); - p /= *i; - if (!boost::filesystem::exists (p)) { - boost::filesystem::remove_all (sd); - boost::filesystem::create_directories (sd); - dcp::make_signer_chain (sd, openssl_path ()); - break; - } - - ++i; - } - - dcp::CertificateChain chain; - - { - boost::filesystem::path p (sd); - p /= "ca.self-signed.pem"; - chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (p))); - } - - { - boost::filesystem::path p (sd); - p /= "intermediate.signed.pem"; - chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (p))); - } - - { - boost::filesystem::path p (sd); - p /= "leaf.signed.pem"; - chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (p))); - } - - boost::filesystem::path signer_key (sd); - signer_key /= "leaf.key"; - - return shared_ptr<const dcp::Signer> (new dcp::Signer (chain, signer_key)); -} - map<string, string> split_get_request (string url) { |
