40 #ifndef LIBDCP_CERTIFICATE_CHAIN_H
41 #define LIBDCP_CERTIFICATE_CHAIN_H
46 #include <boost/filesystem.hpp>
47 #include <boost/optional.hpp>
55 struct certificates_validation1;
56 struct certificates_validation2;
57 struct certificates_validation3;
58 struct certificates_validation4;
59 struct certificates_validation5;
60 struct certificates_validation6;
61 struct certificates_validation7;
62 struct certificates_validation8;
88 boost::filesystem::path openssl,
90 std::string organisation =
"example.org",
91 std::string organisational_unit =
"example.org",
92 std::string root_common_name =
".smpte-430-2.ROOT.NOT_FOR_PRODUCTION",
93 std::string intermediate_common_name =
".smpte-430-2.INTERMEDIATE.NOT_FOR_PRODUCTION",
94 std::string leaf_common_name =
"CS.smpte-430-2.LEAF.NOT_FOR_PRODUCTION"
123 typedef std::vector<Certificate> List;
129 List unordered ()
const;
131 bool valid (std::string* reason =
nullptr)
const;
149 void sign (xmlpp::Element* parent, Standard standard)
const;
156 void add_signature_value (xmlpp::Element* parent, std::string ns,
bool add_indentation)
const;
158 boost::optional<std::string> key ()
const {
162 void set_key (std::string k) {
166 std::string chain ()
const;
169 friend struct ::certificates_validation1;
170 friend struct ::certificates_validation2;
171 friend struct ::certificates_validation3;
172 friend struct ::certificates_validation4;
173 friend struct ::certificates_validation5;
174 friend struct ::certificates_validation6;
175 friend struct ::certificates_validation7;
176 friend struct ::certificates_validation8;
183 boost::optional<std::string>
_key;
A chain of any number of certificates, from root to leaf.
List leaf_to_root() const
List root_to_leaf() const
boost::optional< std::string > _key
bool private_key_valid() const
void add_signature_value(xmlpp::Element *parent, std::string ns, bool add_indentation) const
void sign(xmlpp::Element *parent, Standard standard) const
void remove(Certificate c)
A wrapper for an X509 certificate.
Namespace for everything in libdcp.