summaryrefslogtreecommitdiff
path: root/src/certificate.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-25 14:00:33 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-25 14:00:33 +0100
commit14ce6b8765f47db4f2cc4ab4d2eff64486792e62 (patch)
tree7274c9d4b633964c4f54bbe67ba6bd2ca0dfc0a8 /src/certificate.h
parent04def4c193777d7a6cbd306d0a3ba3944335e444 (diff)
Allow reading of certificate chains from strings.
This also makes the Certificate constructor throw if it finds extra stuff after a certificate it is loading.
Diffstat (limited to 'src/certificate.h')
-rw-r--r--src/certificate.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/certificate.h b/src/certificate.h
index 6193af8f..8237c739 100644
--- a/src/certificate.h
+++ b/src/certificate.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -63,7 +63,6 @@ public:
Certificate ()
: _certificate (0)
, _public_key (0)
- , _extra_data (false)
{}
explicit Certificate (std::string);
@@ -73,6 +72,8 @@ public:
Certificate& operator= (Certificate const &);
+ std::string read_string (std::string);
+
std::string certificate (bool with_begin_end = false) const;
std::string serial () const;
@@ -91,12 +92,7 @@ public:
std::string thumbprint () const;
- bool extra_data () const {
- return _extra_data;
- }
-
private:
- bool read_string (std::string);
static std::string name_for_xml (X509_NAME *);
static std::string asn_to_utf8 (ASN1_STRING *);
@@ -104,10 +100,6 @@ private:
X509* _certificate;
mutable RSA* _public_key;
- /** true if extra data was found when this certificate was read
- from a string.
- */
- bool _extra_data;
};
bool operator== (Certificate const & a, Certificate const & b);