diff options
author | Jack Lloyd <[email protected]> | 2017-12-04 14:00:47 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-04 14:00:47 -0500 |
commit | 697fdc8fcb7f4ada4699ccad80def4673270d133 (patch) | |
tree | 5b2ec8652a20d7e0c0b74f328958818fafaa14b4 /src/lib/x509/x509cert.h | |
parent | d3c1f3ba1a9d03ff8e84f0044ee3854804fac86b (diff) |
Support uninitialized certificate objects
Issued raised by @securitykernel on Slack, there was no non-hacky
way to decode a list of certificate objects because creating an
uninitialized one wasn't allowed. However after #884 that got much
closer to being viable, this is the last pieces.
Diffstat (limited to 'src/lib/x509/x509cert.h')
-rw-r--r-- | src/lib/x509/x509cert.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/x509/x509cert.h b/src/lib/x509/x509cert.h index 3b35c6575..dc32e70c1 100644 --- a/src/lib/x509/x509cert.h +++ b/src/lib/x509/x509cert.h @@ -395,15 +395,22 @@ class BOTAN_PUBLIC_API(2,0) X509_Certificate : public X509_Object */ explicit X509_Certificate(const std::vector<uint8_t>& in); + /** + * Create an uninitialized certificate object. Any attempts to + * access this object will throw an exception. + */ + X509_Certificate() = default; + X509_Certificate(const X509_Certificate& other) = default; X509_Certificate& operator=(const X509_Certificate& other) = default; private: - void force_decode() override; - friend class X509_CA; + std::string PEM_label() const override; - X509_Certificate() = default; + std::vector<std::string> alternate_PEM_labels() const override; + + void force_decode() override; const X509_Certificate_Data& data() const; |