projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More win32 build hacks.
[libdcp.git]
/
src
/
certificates.h
diff --git
a/src/certificates.h
b/src/certificates.h
index 0b7127c869c4fcedfe6c41954e99c3a7dc23f3e6..9caea5a786cd8e8a15e1acde2c8c48922c27079d 100644
(file)
--- a/
src/certificates.h
+++ b/
src/certificates.h
@@
-24,6
+24,7
@@
#include <list>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <list>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
+#undef X509_NAME
#include <openssl/x509.h>
class certificates;
#include <openssl/x509.h>
class certificates;
@@
-37,6
+38,11
@@
namespace libdcp {
class Certificate : public boost::noncopyable
{
public:
class Certificate : public boost::noncopyable
{
public:
+ Certificate ()
+ : _certificate (0)
+ {}
+
+ Certificate (std::string const &);
Certificate (X509 *);
~Certificate ();
Certificate (X509 *);
~Certificate ();
@@
-47,9
+53,11
@@
public:
std::string thumbprint () const;
std::string thumbprint () const;
- static std::string name_for_xml (std::string const &);
-
private:
private:
+ static std::string name_for_xml (X509_NAME *);
+ static std::string asn_to_utf8 (ASN1_STRING *);
+ static std::string get_name_part (X509_NAME *, int);
+
X509* _certificate;
};
X509* _certificate;
};
@@
-57,7
+65,8
@@
class CertificateChain
{
public:
CertificateChain () {}
{
public:
CertificateChain () {}
- CertificateChain (std::string const &);
+
+ void add (boost::shared_ptr<Certificate>);
boost::shared_ptr<Certificate> root () const;
boost::shared_ptr<Certificate> leaf () const;
boost::shared_ptr<Certificate> root () const;
boost::shared_ptr<Certificate> leaf () const;