summaryrefslogtreecommitdiff
path: root/src/signer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-19 13:49:37 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-19 13:49:37 +0100
commit452144160eb864984121d3fa883a12d40fbf7e47 (patch)
treef5da78c803eb8f668d2409de856ddc86be81d492 /src/signer.h
parentafeea0415dd56a3106a4c71df2e4a6ccc2d72e74 (diff)
Rename Encryption -> Signer; move some methods into it.
Diffstat (limited to 'src/signer.h')
-rw-r--r--src/signer.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/signer.h b/src/signer.h
new file mode 100644
index 00000000..a4d10b2a
--- /dev/null
+++ b/src/signer.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/filesystem.hpp>
+#include "certificates.h"
+
+namespace libdcp {
+
+class Signer
+{
+public:
+ Signer (CertificateChain c, boost::filesystem::path k)
+ : _certificates (c)
+ , _key (k)
+ {}
+
+ void sign (xmlpp::Element* parent, bool interop) const;
+ void add_signature_value (xmlpp::Element* parent, std::string ns) const;
+
+ CertificateChain const & certificates () const {
+ return _certificates;
+ }
+
+private:
+
+ void add_signer (xmlpp::Element* parent, std::string ns) const;
+
+ CertificateChain _certificates;
+ /** Filename of signer key */
+ boost::filesystem::path _key;
+};
+
+}