summaryrefslogtreecommitdiff
path: root/src/certificate.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-27 21:06:26 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-27 21:06:26 +0000
commitb28be8a5d9610dc8c83a19d1d531f9ebf21e1492 (patch)
tree5461aa7e9a914e62dc3d81a516bfa33ba05a6a3f /src/certificate.h
parent3757ba5e3207944a66610c4a82068029dd8a49a3 (diff)
Check for trailing data when loading certificates.
Diffstat (limited to 'src/certificate.h')
-rw-r--r--src/certificate.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/certificate.h b/src/certificate.h
index 6225cf31..438d9980 100644
--- a/src/certificate.h
+++ b/src/certificate.h
@@ -76,8 +76,12 @@ public:
std::string thumbprint () const;
+ bool extra_data () const {
+ return _extra_data;
+ }
+
private:
- void read_string (std::string);
+ bool read_string (std::string);
static std::string name_for_xml (X509_NAME *);
static std::string asn_to_utf8 (ASN1_STRING *);
@@ -85,6 +89,10 @@ 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);