+extern void sign (xmlpp::Element* parent, CertificateChain const & certificates, boost::filesystem::path signer_key, Standard standard);
+extern void add_signature_value (xmlpp::Element* parent, CertificateChain const & certificates, boost::filesystem::path signer_key, std::string const & ns);
+extern void add_signer (xmlpp::Element* parent, CertificateChain const & certificates, std::string const & ns);
+
+extern int base64_decode (std::string const & in, unsigned char* out, int out_length);
+extern boost::optional<boost::filesystem::path> relative_to_root (boost::filesystem::path root, boost::filesystem::path file);
+extern FILE * fopen_boost (boost::filesystem::path, std::string);
+extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 65536);
+extern std::string private_key_fingerprint (std::string key);
+extern xmlpp::Node* find_child (xmlpp::Node const * node, std::string name);
+
+template <class F, class T>
+std::list<boost::shared_ptr<T> >
+list_of_type (std::list<boost::shared_ptr<F> > const & from)
+{
+ std::list<boost::shared_ptr<T> > out;
+ for (typename std::list<boost::shared_ptr<F> >::const_iterator i = from.begin(); i != from.end(); ++i) {
+ boost::shared_ptr<T> check = boost::dynamic_pointer_cast<T> (*i);
+ if (check) {
+ out.push_back (check);
+ }
+ }
+
+ return out;