Get Signer to take a PEM string rather than a filename.
[libdcp.git] / src / certificates.h
index 96a8cbb7dee6995239cc318cc5ae738c374a4f4b..8ae562c91543e882d85c40163032b39b67a68812 100644 (file)
@@ -65,6 +65,10 @@ public:
        std::string subject () const;
        std::string common_name () const;
 
+       X509* x509 () const {
+               return _certificate;
+       }
+
        RSA* public_key () const;
 
        std::string thumbprint () const;
@@ -89,15 +93,24 @@ public:
        CertificateChain () {}
 
        void add (boost::shared_ptr<Certificate> c);
+       void remove (boost::shared_ptr<Certificate> c);
+       void remove (int);
 
        boost::shared_ptr<Certificate> root () const;
        boost::shared_ptr<Certificate> leaf () const;
 
-       std::list<boost::shared_ptr<Certificate> > leaf_to_root () const;
+       typedef std::list<boost::shared_ptr<Certificate> > List;
+       
+       List leaf_to_root () const;
+       List root_to_leaf () const;
+
+       bool verify () const;
+       bool attempt_reorder ();
 
 private:
        friend class ::certificates;
-       std::list<boost::shared_ptr<Certificate> > _certificates;
+
+       List _certificates;
 };
 
 }